Skip to content

Commit 02a4129

Browse files
committed
fix(clap): call iter() directly
As IntoIter is only implemented for slices up a sice of 32. DFAReporting though will reach 55, at least. Also added dfareporting-cli code to show how stackoverflow issues can be circumvented efficiently.
1 parent 656fcae commit 02a4129

4 files changed

Lines changed: 5949 additions & 5650 deletions

File tree

gen/dfareporting2d1-cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ This documentation was generated from the *dfareporting* API at revision *201503
214214
dfareporting2d1 --help
215215

216216
All documentation details can be found at
217-
http://byron.github.io/google-apis-rs/google_dfareporting2d1_cli/index.html
217+
http://byron.github.io/google-apis-rs/google_dfareporting2d1_cli
218218

219219
Configuration:
220220
--scope <url>

gen/dfareporting2d1-cli/src/cmn.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token};
44
use rustc_serialize::json;
55
use mime::Mime;
6+
use clap::{App, SubCommand};
67

78
use std::fs;
89
use std::env;
@@ -17,6 +18,22 @@ use std::default::Default;
1718

1819
const FIELD_SEP: char = '.';
1920

21+
/// Unused for now, can be used once https://github.com/kbknapp/clap-rs/issues/87
22+
/// is available
23+
pub enum UploadProtocol {
24+
Simple,
25+
Resumable,
26+
}
27+
28+
impl AsRef<str> for UploadProtocol {
29+
fn as_ref(&self) -> &str {
30+
match *self {
31+
UploadProtocol::Simple => "simple",
32+
UploadProtocol::Resumable => "resumable",
33+
}
34+
}
35+
}
36+
2037
#[derive(Clone, Default)]
2138
pub struct FieldCursor(Vec<String>);
2239

0 commit comments

Comments
 (0)