Skip to content

Commit

Permalink
fix(clap): call iter() directly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Byron committed Apr 29, 2015
1 parent 656fcae commit 02a4129
Show file tree
Hide file tree
Showing 4 changed files with 5,949 additions and 5,650 deletions.
2 changes: 1 addition & 1 deletion gen/dfareporting2d1-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ This documentation was generated from the *dfareporting* API at revision *201503
dfareporting2d1 --help

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

Configuration:
--scope <url>
Expand Down
17 changes: 17 additions & 0 deletions gen/dfareporting2d1-cli/src/cmn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use oauth2::{ApplicationSecret, ConsoleApplicationSecret, TokenStorage, Token};
use rustc_serialize::json;
use mime::Mime;
use clap::{App, SubCommand};

use std::fs;
use std::env;
Expand All @@ -17,6 +18,22 @@ use std::default::Default;

const FIELD_SEP: char = '.';

/// Unused for now, can be used once https://github.com/kbknapp/clap-rs/issues/87
/// is available
pub enum UploadProtocol {
Simple,
Resumable,
}

impl AsRef<str> for UploadProtocol {
fn as_ref(&self) -> &str {
match *self {
UploadProtocol::Simple => "simple",
UploadProtocol::Resumable => "resumable",
}
}
}

#[derive(Clone, Default)]
pub struct FieldCursor(Vec<String>);

Expand Down
Loading

0 comments on commit 02a4129

Please sign in to comment.