From e46535917ceeb9ba8cce2cbab39ae1e3f82942ac Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 15 Jul 2015 09:52:55 +0200 Subject: [PATCH] chore(code-update): upgrade to latest hyper+clap --- gen/adexchangebuyer1d3-cli/Cargo.toml | 4 +- gen/adexchangebuyer1d3-cli/src/main.rs | 4 +- gen/adexchangebuyer1d3/Cargo.toml | 2 +- gen/adexchangeseller2-cli/Cargo.toml | 4 +- gen/adexchangeseller2-cli/src/main.rs | 4 +- gen/adexchangeseller2/Cargo.toml | 2 +- gen/admin1_directory-cli/Cargo.toml | 4 +- gen/admin1_directory-cli/src/main.rs | 4 +- gen/admin1_directory/Cargo.toml | 2 +- gen/admin1_reports-cli/Cargo.toml | 4 +- gen/admin1_reports-cli/src/main.rs | 4 +- gen/admin1_reports/Cargo.toml | 2 +- gen/admin2_email_migration-cli/Cargo.toml | 4 +- gen/admin2_email_migration-cli/src/main.rs | 4 +- gen/admin2_email_migration/Cargo.toml | 2 +- gen/admin2_email_migration/src/lib.rs.in | 15 ++-- gen/adsense1d4-cli/Cargo.toml | 4 +- gen/adsense1d4-cli/src/main.rs | 4 +- gen/adsense1d4/Cargo.toml | 2 +- gen/adsensehost4d1-cli/Cargo.toml | 4 +- gen/adsensehost4d1-cli/src/main.rs | 4 +- gen/adsensehost4d1/Cargo.toml | 2 +- gen/analytics3-cli/Cargo.toml | 4 +- gen/analytics3-cli/src/main.rs | 4 +- gen/analytics3/Cargo.toml | 2 +- gen/analytics3/src/lib.rs.in | 15 ++-- gen/androidenterprise1-cli/Cargo.toml | 4 +- gen/androidenterprise1-cli/src/main.rs | 4 +- gen/androidenterprise1/Cargo.toml | 2 +- gen/androidpublisher2-cli/Cargo.toml | 4 +- gen/androidpublisher2-cli/src/main.rs | 4 +- gen/androidpublisher2/Cargo.toml | 2 +- gen/androidpublisher2/src/lib.rs.in | 45 ++++------ gen/appsactivity1-cli/Cargo.toml | 4 +- gen/appsactivity1-cli/src/main.rs | 4 +- gen/appsactivity1/Cargo.toml | 2 +- gen/appstate1-cli/Cargo.toml | 4 +- gen/appstate1-cli/src/main.rs | 4 +- gen/appstate1/Cargo.toml | 2 +- gen/audit1-cli/Cargo.toml | 4 +- gen/audit1-cli/src/main.rs | 4 +- gen/audit1/Cargo.toml | 2 +- gen/autoscaler1_beta2-cli/Cargo.toml | 4 +- gen/autoscaler1_beta2-cli/src/main.rs | 4 +- gen/autoscaler1_beta2/Cargo.toml | 2 +- gen/bigquery2-cli/Cargo.toml | 4 +- gen/bigquery2-cli/src/main.rs | 4 +- gen/bigquery2/Cargo.toml | 2 +- gen/bigquery2/src/lib.rs.in | 15 ++-- gen/blogger3-cli/Cargo.toml | 4 +- gen/blogger3-cli/src/main.rs | 4 +- gen/blogger3/Cargo.toml | 2 +- gen/books1-cli/Cargo.toml | 4 +- gen/books1-cli/src/main.rs | 4 +- gen/books1/Cargo.toml | 2 +- gen/calendar3-cli/Cargo.toml | 4 +- gen/calendar3-cli/src/main.rs | 4 +- gen/calendar3/Cargo.toml | 2 +- gen/civicinfo2-cli/Cargo.toml | 4 +- gen/civicinfo2-cli/src/main.rs | 4 +- gen/civicinfo2/Cargo.toml | 2 +- gen/cloudlatencytest2-cli/Cargo.toml | 4 +- gen/cloudlatencytest2-cli/src/main.rs | 4 +- gen/cloudlatencytest2/Cargo.toml | 2 +- gen/cloudmonitoring2_beta2-cli/Cargo.toml | 4 +- gen/cloudmonitoring2_beta2-cli/src/main.rs | 4 +- gen/cloudmonitoring2_beta2/Cargo.toml | 2 +- .../Cargo.toml | 4 +- .../src/main.rs | 4 +- gen/cloudresourcemanager1_beta1/Cargo.toml | 2 +- gen/compute1-cli/Cargo.toml | 4 +- gen/compute1-cli/src/main.rs | 4 +- gen/compute1/Cargo.toml | 2 +- gen/container1_beta1-cli/Cargo.toml | 4 +- gen/container1_beta1-cli/src/main.rs | 4 +- gen/container1_beta1/Cargo.toml | 2 +- gen/content2-cli/Cargo.toml | 4 +- gen/content2-cli/src/main.rs | 4 +- gen/content2/Cargo.toml | 2 +- gen/coordinate1-cli/Cargo.toml | 4 +- gen/coordinate1-cli/src/main.rs | 4 +- gen/coordinate1/Cargo.toml | 2 +- gen/customsearch1-cli/Cargo.toml | 4 +- gen/customsearch1-cli/src/main.rs | 4 +- gen/customsearch1/Cargo.toml | 2 +- gen/datastore1_beta2-cli/Cargo.toml | 4 +- gen/datastore1_beta2-cli/src/main.rs | 4 +- gen/datastore1_beta2/Cargo.toml | 2 +- gen/deploymentmanager2_beta2-cli/Cargo.toml | 4 +- gen/deploymentmanager2_beta2-cli/src/main.rs | 4 +- gen/deploymentmanager2_beta2/Cargo.toml | 2 +- gen/dfareporting2d1-cli/Cargo.toml | 4 +- gen/dfareporting2d1-cli/src/main.rs | 4 +- gen/dfareporting2d1/Cargo.toml | 2 +- gen/dfareporting2d1/src/lib.rs.in | 15 ++-- gen/discovery1-cli/Cargo.toml | 4 +- gen/discovery1-cli/src/main.rs | 4 +- gen/discovery1/Cargo.toml | 2 +- gen/dns1-cli/Cargo.toml | 4 +- gen/dns1-cli/src/main.rs | 4 +- gen/dns1/Cargo.toml | 2 +- gen/doubleclickbidmanager1-cli/Cargo.toml | 4 +- gen/doubleclickbidmanager1-cli/src/main.rs | 4 +- gen/doubleclickbidmanager1/Cargo.toml | 2 +- gen/doubleclicksearch2-cli/Cargo.toml | 4 +- gen/doubleclicksearch2-cli/src/main.rs | 4 +- gen/doubleclicksearch2/Cargo.toml | 2 +- gen/drive2-cli/Cargo.toml | 4 +- gen/drive2-cli/src/main.rs | 4 +- gen/drive2/Cargo.toml | 2 +- gen/drive2/src/lib.rs.in | 45 ++++------ gen/fitness1-cli/Cargo.toml | 4 +- gen/fitness1-cli/src/main.rs | 4 +- gen/fitness1/Cargo.toml | 2 +- gen/freebase1-cli/Cargo.toml | 4 +- gen/freebase1-cli/src/main.rs | 4 +- gen/freebase1/Cargo.toml | 2 +- gen/freebase1_sandbox-cli/Cargo.toml | 4 +- gen/freebase1_sandbox-cli/src/main.rs | 4 +- gen/freebase1_sandbox/Cargo.toml | 2 +- gen/fusiontables2-cli/Cargo.toml | 4 +- gen/fusiontables2-cli/src/main.rs | 4 +- gen/fusiontables2/Cargo.toml | 2 +- gen/fusiontables2/src/lib.rs.in | 45 ++++------ gen/games1-cli/Cargo.toml | 4 +- gen/games1-cli/src/main.rs | 4 +- gen/games1/Cargo.toml | 2 +- .../Cargo.toml | 4 +- .../src/main.rs | 4 +- .../Cargo.toml | 2 +- .../src/lib.rs.in | 15 ++-- .../Cargo.toml | 4 +- .../src/main.rs | 4 +- gen/gamesmanagement1_management/Cargo.toml | 2 +- gen/gan1_beta1-cli/Cargo.toml | 4 +- gen/gan1_beta1-cli/src/main.rs | 4 +- gen/gan1_beta1/Cargo.toml | 2 +- gen/gmail1-cli/Cargo.toml | 4 +- gen/gmail1-cli/src/main.rs | 4 +- gen/gmail1/Cargo.toml | 2 +- gen/gmail1/src/lib.rs.in | 90 ++++++++----------- gen/groupsmigration1-cli/Cargo.toml | 4 +- gen/groupsmigration1-cli/src/main.rs | 4 +- gen/groupsmigration1/Cargo.toml | 2 +- gen/groupsmigration1/src/lib.rs.in | 15 ++-- gen/groupssettings1-cli/Cargo.toml | 4 +- gen/groupssettings1-cli/src/main.rs | 4 +- gen/groupssettings1/Cargo.toml | 2 +- gen/identitytoolkit3-cli/Cargo.toml | 4 +- gen/identitytoolkit3-cli/src/main.rs | 4 +- gen/identitytoolkit3/Cargo.toml | 2 +- gen/licensing1-cli/Cargo.toml | 4 +- gen/licensing1-cli/src/main.rs | 4 +- gen/licensing1/Cargo.toml | 2 +- gen/logging1_beta3-cli/Cargo.toml | 4 +- gen/logging1_beta3-cli/src/main.rs | 4 +- gen/logging1_beta3/Cargo.toml | 2 +- gen/manager1_beta2-cli/Cargo.toml | 4 +- gen/manager1_beta2-cli/src/main.rs | 4 +- gen/manager1_beta2/Cargo.toml | 2 +- gen/mapsengine1-cli/Cargo.toml | 4 +- gen/mapsengine1-cli/src/main.rs | 4 +- gen/mapsengine1/Cargo.toml | 2 +- gen/mapsengine1/src/lib.rs.in | 45 ++++------ gen/mirror1-cli/Cargo.toml | 4 +- gen/mirror1-cli/src/main.rs | 4 +- gen/mirror1/Cargo.toml | 2 +- gen/mirror1/src/lib.rs.in | 45 ++++------ gen/oauth2_v2-cli/Cargo.toml | 4 +- gen/oauth2_v2-cli/src/main.rs | 4 +- gen/oauth2_v2/Cargo.toml | 2 +- gen/pagespeedonline2-cli/Cargo.toml | 4 +- gen/pagespeedonline2-cli/src/main.rs | 4 +- gen/pagespeedonline2/Cargo.toml | 2 +- gen/plus1-cli/Cargo.toml | 4 +- gen/plus1-cli/src/main.rs | 4 +- gen/plus1/Cargo.toml | 2 +- gen/plusdomains1-cli/Cargo.toml | 4 +- gen/plusdomains1-cli/src/main.rs | 4 +- gen/plusdomains1/Cargo.toml | 2 +- gen/plusdomains1/src/lib.rs.in | 15 ++-- gen/prediction1d6-cli/Cargo.toml | 4 +- gen/prediction1d6-cli/src/main.rs | 4 +- gen/prediction1d6/Cargo.toml | 2 +- gen/pubsub1_beta2-cli/Cargo.toml | 4 +- gen/pubsub1_beta2-cli/src/main.rs | 4 +- gen/pubsub1_beta2/Cargo.toml | 2 +- gen/qpxexpress1-cli/Cargo.toml | 4 +- gen/qpxexpress1-cli/src/main.rs | 4 +- gen/qpxexpress1/Cargo.toml | 2 +- gen/replicapool1_beta2-cli/Cargo.toml | 4 +- gen/replicapool1_beta2-cli/src/main.rs | 4 +- gen/replicapool1_beta2/Cargo.toml | 2 +- gen/replicapoolupdater1_beta1-cli/Cargo.toml | 4 +- gen/replicapoolupdater1_beta1-cli/src/main.rs | 4 +- gen/replicapoolupdater1_beta1/Cargo.toml | 2 +- gen/reseller1_sandbox-cli/Cargo.toml | 4 +- gen/reseller1_sandbox-cli/src/main.rs | 4 +- gen/reseller1_sandbox/Cargo.toml | 2 +- gen/resourceviews1_beta2-cli/Cargo.toml | 4 +- gen/resourceviews1_beta2-cli/src/main.rs | 4 +- gen/resourceviews1_beta2/Cargo.toml | 2 +- gen/siteverification1-cli/Cargo.toml | 4 +- gen/siteverification1-cli/src/main.rs | 4 +- gen/siteverification1/Cargo.toml | 2 +- gen/spectrum1_explorer-cli/Cargo.toml | 4 +- gen/spectrum1_explorer-cli/src/main.rs | 4 +- gen/spectrum1_explorer/Cargo.toml | 2 +- gen/sqladmin1_beta4-cli/Cargo.toml | 4 +- gen/sqladmin1_beta4-cli/src/main.rs | 4 +- gen/sqladmin1_beta4/Cargo.toml | 2 +- gen/storage1-cli/Cargo.toml | 4 +- gen/storage1-cli/src/main.rs | 4 +- gen/storage1/Cargo.toml | 2 +- gen/storage1/src/lib.rs.in | 15 ++-- gen/tagmanager1-cli/Cargo.toml | 4 +- gen/tagmanager1-cli/src/main.rs | 4 +- gen/tagmanager1/Cargo.toml | 2 +- gen/taskqueue1_beta2-cli/Cargo.toml | 4 +- gen/taskqueue1_beta2-cli/src/main.rs | 4 +- gen/taskqueue1_beta2/Cargo.toml | 2 +- gen/tasks1-cli/Cargo.toml | 4 +- gen/tasks1-cli/src/main.rs | 4 +- gen/tasks1/Cargo.toml | 2 +- gen/translate2-cli/Cargo.toml | 4 +- gen/translate2-cli/src/main.rs | 4 +- gen/translate2/Cargo.toml | 2 +- gen/urlshortener1-cli/Cargo.toml | 4 +- gen/urlshortener1-cli/src/main.rs | 4 +- gen/urlshortener1/Cargo.toml | 2 +- gen/webfonts1-cli/Cargo.toml | 4 +- gen/webfonts1-cli/src/main.rs | 4 +- gen/webfonts1/Cargo.toml | 2 +- gen/webmasters3-cli/Cargo.toml | 4 +- gen/webmasters3-cli/src/main.rs | 4 +- gen/webmasters3/Cargo.toml | 2 +- gen/youtube3-cli/Cargo.toml | 4 +- gen/youtube3-cli/src/main.rs | 4 +- gen/youtube3/cargo.toml | 2 +- gen/youtube3/src/lib.rs.in | 90 ++++++++----------- gen/youtubeanalytics1-cli/Cargo.toml | 4 +- gen/youtubeanalytics1-cli/src/main.rs | 4 +- gen/youtubeanalytics1/Cargo.toml | 2 +- 243 files changed, 590 insertions(+), 695 deletions(-) diff --git a/gen/adexchangebuyer1d3-cli/Cargo.toml b/gen/adexchangebuyer1d3-cli/Cargo.toml index 39982679d4..485c96eefc 100644 --- a/gen/adexchangebuyer1d3-cli/Cargo.toml +++ b/gen/adexchangebuyer1d3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["adexchangebuyer", "google", "cli"] name = "adexchangebuyer1d3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/adexchangebuyer1d3-cli/src/main.rs b/gen/adexchangebuyer1d3-cli/src/main.rs index 41e90c0076..b7071896d5 100644 --- a/gen/adexchangebuyer1d3-cli/src/main.rs +++ b/gen/adexchangebuyer1d3-cli/src/main.rs @@ -2306,10 +2306,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/adexchangebuyer1d3/Cargo.toml b/gen/adexchangebuyer1d3/Cargo.toml index 70c51c923e..4f6b2424e8 100644 --- a/gen/adexchangebuyer1d3/Cargo.toml +++ b/gen/adexchangebuyer1d3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/adexchangeseller2-cli/Cargo.toml b/gen/adexchangeseller2-cli/Cargo.toml index dedfe56ec2..630fcb4075 100644 --- a/gen/adexchangeseller2-cli/Cargo.toml +++ b/gen/adexchangeseller2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["adexchangeseller", "google", "cli"] name = "adexchangeseller2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/adexchangeseller2-cli/src/main.rs b/gen/adexchangeseller2-cli/src/main.rs index 235cc112ae..b6ce7b5e92 100644 --- a/gen/adexchangeseller2-cli/src/main.rs +++ b/gen/adexchangeseller2-cli/src/main.rs @@ -1371,10 +1371,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/adexchangeseller2/Cargo.toml b/gen/adexchangeseller2/Cargo.toml index de84304878..4fbe881fcd 100644 --- a/gen/adexchangeseller2/Cargo.toml +++ b/gen/adexchangeseller2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/admin1_directory-cli/Cargo.toml b/gen/admin1_directory-cli/Cargo.toml index 1cb69281c5..3ba4b2de91 100644 --- a/gen/admin1_directory-cli/Cargo.toml +++ b/gen/admin1_directory-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"] name = "admin1-directory" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/admin1_directory-cli/src/main.rs b/gen/admin1_directory-cli/src/main.rs index bd0ee2f315..af65a0358b 100644 --- a/gen/admin1_directory-cli/src/main.rs +++ b/gen/admin1_directory-cli/src/main.rs @@ -6913,10 +6913,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/admin1_directory/Cargo.toml b/gen/admin1_directory/Cargo.toml index e63079d04f..10710534a9 100644 --- a/gen/admin1_directory/Cargo.toml +++ b/gen/admin1_directory/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/admin1_reports-cli/Cargo.toml b/gen/admin1_reports-cli/Cargo.toml index 1b61262fbf..d4deffbfaf 100644 --- a/gen/admin1_reports-cli/Cargo.toml +++ b/gen/admin1_reports-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"] name = "admin1-reports" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/admin1_reports-cli/src/main.rs b/gen/admin1_reports-cli/src/main.rs index 0a78ffd29a..8ade569fe1 100644 --- a/gen/admin1_reports-cli/src/main.rs +++ b/gen/admin1_reports-cli/src/main.rs @@ -759,10 +759,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/admin1_reports/Cargo.toml b/gen/admin1_reports/Cargo.toml index 9d0c137d44..30b6472592 100644 --- a/gen/admin1_reports/Cargo.toml +++ b/gen/admin1_reports/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/admin2_email_migration-cli/Cargo.toml b/gen/admin2_email_migration-cli/Cargo.toml index 8990e854ca..9b5a6d9ba0 100644 --- a/gen/admin2_email_migration-cli/Cargo.toml +++ b/gen/admin2_email_migration-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"] name = "admin2-email-migration" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/admin2_email_migration-cli/src/main.rs b/gen/admin2_email_migration-cli/src/main.rs index 3ecc908d31..25e690d613 100644 --- a/gen/admin2_email_migration-cli/src/main.rs +++ b/gen/admin2_email_migration-cli/src/main.rs @@ -292,10 +292,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/admin2_email_migration/Cargo.toml b/gen/admin2_email_migration/Cargo.toml index 853a7c2f0b..5686d7268d 100644 --- a/gen/admin2_email_migration/Cargo.toml +++ b/gen/admin2_email_migration/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/admin2_email_migration/src/lib.rs.in b/gen/admin2_email_migration/src/lib.rs.in index 83e8e4e897..11db4d9b38 100644 --- a/gen/admin2_email_migration/src/lib.rs.in +++ b/gen/admin2_email_migration/src/lib.rs.in @@ -421,15 +421,12 @@ impl<'a, C, A> MailInsertCall<'a, C, A> where C: BorrowMut, A: oa if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/adsense1d4-cli/Cargo.toml b/gen/adsense1d4-cli/Cargo.toml index 8e1d783ed6..38b93b8ce9 100644 --- a/gen/adsense1d4-cli/Cargo.toml +++ b/gen/adsense1d4-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["adsense", "google", "cli"] name = "adsense1d4" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/adsense1d4-cli/src/main.rs b/gen/adsense1d4-cli/src/main.rs index 965cbd9ab9..a8d378969e 100644 --- a/gen/adsense1d4-cli/src/main.rs +++ b/gen/adsense1d4-cli/src/main.rs @@ -3504,10 +3504,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/adsense1d4/Cargo.toml b/gen/adsense1d4/Cargo.toml index 8a5ed0a22f..07bdce6120 100644 --- a/gen/adsense1d4/Cargo.toml +++ b/gen/adsense1d4/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/adsensehost4d1-cli/Cargo.toml b/gen/adsensehost4d1-cli/Cargo.toml index e21c36f110..fa1ca55637 100644 --- a/gen/adsensehost4d1-cli/Cargo.toml +++ b/gen/adsensehost4d1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["adsensehost", "google", "cli"] name = "adsensehost4d1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/adsensehost4d1-cli/src/main.rs b/gen/adsensehost4d1-cli/src/main.rs index 262f6e1b76..08ae445dab 100644 --- a/gen/adsensehost4d1-cli/src/main.rs +++ b/gen/adsensehost4d1-cli/src/main.rs @@ -2785,10 +2785,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/adsensehost4d1/Cargo.toml b/gen/adsensehost4d1/Cargo.toml index 42d7eedb55..03e8c56f94 100644 --- a/gen/adsensehost4d1/Cargo.toml +++ b/gen/adsensehost4d1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/analytics3-cli/Cargo.toml b/gen/analytics3-cli/Cargo.toml index 476598fa79..42181041d2 100644 --- a/gen/analytics3-cli/Cargo.toml +++ b/gen/analytics3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["analytics", "google", "cli"] name = "analytics3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/analytics3-cli/src/main.rs b/gen/analytics3-cli/src/main.rs index 944de95b8d..1a5881e8c8 100644 --- a/gen/analytics3-cli/src/main.rs +++ b/gen/analytics3-cli/src/main.rs @@ -9247,10 +9247,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/analytics3/Cargo.toml b/gen/analytics3/Cargo.toml index 55789da1ac..ec293f9699 100644 --- a/gen/analytics3/Cargo.toml +++ b/gen/analytics3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/analytics3/src/lib.rs.in b/gen/analytics3/src/lib.rs.in index 923fae41ac..6ef0c1304f 100644 --- a/gen/analytics3/src/lib.rs.in +++ b/gen/analytics3/src/lib.rs.in @@ -14217,15 +14217,12 @@ impl<'a, C, A> ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/androidenterprise1-cli/Cargo.toml b/gen/androidenterprise1-cli/Cargo.toml index ddfadb295a..8e4ac3cb54 100644 --- a/gen/androidenterprise1-cli/Cargo.toml +++ b/gen/androidenterprise1-cli/Cargo.toml @@ -16,13 +16,13 @@ keywords = ["androidenterprise", "google", "cli"] name = "androidenterprise1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/androidenterprise1-cli/src/main.rs b/gen/androidenterprise1-cli/src/main.rs index 0ac4ecfcf2..d649b6ddcc 100644 --- a/gen/androidenterprise1-cli/src/main.rs +++ b/gen/androidenterprise1-cli/src/main.rs @@ -4686,10 +4686,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/androidenterprise1/Cargo.toml b/gen/androidenterprise1/Cargo.toml index 70046a344a..c6c8de1ab7 100644 --- a/gen/androidenterprise1/Cargo.toml +++ b/gen/androidenterprise1/Cargo.toml @@ -15,7 +15,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/androidpublisher2-cli/Cargo.toml b/gen/androidpublisher2-cli/Cargo.toml index 2af578ae77..3072694a54 100644 --- a/gen/androidpublisher2-cli/Cargo.toml +++ b/gen/androidpublisher2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["androidpublisher", "google", "cli"] name = "androidpublisher2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/androidpublisher2-cli/src/main.rs b/gen/androidpublisher2-cli/src/main.rs index 2dd62f5f5a..8eff3779f8 100644 --- a/gen/androidpublisher2-cli/src/main.rs +++ b/gen/androidpublisher2-cli/src/main.rs @@ -5490,10 +5490,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/androidpublisher2/Cargo.toml b/gen/androidpublisher2/Cargo.toml index 644110e12e..00bc9e3fb1 100644 --- a/gen/androidpublisher2/Cargo.toml +++ b/gen/androidpublisher2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/androidpublisher2/src/lib.rs.in b/gen/androidpublisher2/src/lib.rs.in index 33944dde42..aa562614d0 100644 --- a/gen/androidpublisher2/src/lib.rs.in +++ b/gen/androidpublisher2/src/lib.rs.in @@ -4360,15 +4360,12 @@ impl<'a, C, A> EditImageUploadCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -8266,15 +8263,12 @@ impl<'a, C, A> EditApkUploadCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -10497,15 +10491,12 @@ impl<'a, C, A> EditExpansionfileUploadCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/appsactivity1-cli/Cargo.toml b/gen/appsactivity1-cli/Cargo.toml index df649b60a7..66e3cf3baf 100644 --- a/gen/appsactivity1-cli/Cargo.toml +++ b/gen/appsactivity1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["appsactivity", "google", "cli"] name = "appsactivity1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/appsactivity1-cli/src/main.rs b/gen/appsactivity1-cli/src/main.rs index 6c501d013b..4f710d959b 100644 --- a/gen/appsactivity1-cli/src/main.rs +++ b/gen/appsactivity1-cli/src/main.rs @@ -264,10 +264,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/appsactivity1/Cargo.toml b/gen/appsactivity1/Cargo.toml index d20cea91b3..1f50158700 100644 --- a/gen/appsactivity1/Cargo.toml +++ b/gen/appsactivity1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/appstate1-cli/Cargo.toml b/gen/appstate1-cli/Cargo.toml index d1b7ad7f26..508577353f 100644 --- a/gen/appstate1-cli/Cargo.toml +++ b/gen/appstate1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["appstate", "google", "cli"] name = "appstate1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/appstate1-cli/src/main.rs b/gen/appstate1-cli/src/main.rs index 33605b3a81..07e5bb2a54 100644 --- a/gen/appstate1-cli/src/main.rs +++ b/gen/appstate1-cli/src/main.rs @@ -592,10 +592,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/appstate1/Cargo.toml b/gen/appstate1/Cargo.toml index 603f68e19d..d483693e4d 100644 --- a/gen/appstate1/Cargo.toml +++ b/gen/appstate1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/audit1-cli/Cargo.toml b/gen/audit1-cli/Cargo.toml index b889219e02..e5277b00e3 100644 --- a/gen/audit1-cli/Cargo.toml +++ b/gen/audit1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["audit", "google", "cli"] name = "audit1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/audit1-cli/src/main.rs b/gen/audit1-cli/src/main.rs index 5e75ca65c5..4933386542 100644 --- a/gen/audit1-cli/src/main.rs +++ b/gen/audit1-cli/src/main.rs @@ -274,10 +274,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/audit1/Cargo.toml b/gen/audit1/Cargo.toml index da21026276..66c8d813ef 100644 --- a/gen/audit1/Cargo.toml +++ b/gen/audit1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/autoscaler1_beta2-cli/Cargo.toml b/gen/autoscaler1_beta2-cli/Cargo.toml index 8318478a47..c3f2f4f6ee 100644 --- a/gen/autoscaler1_beta2-cli/Cargo.toml +++ b/gen/autoscaler1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["autoscaler", "google", "cli"] name = "autoscaler1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/autoscaler1_beta2-cli/src/main.rs b/gen/autoscaler1_beta2-cli/src/main.rs index f589ef5e2f..2552e5c285 100644 --- a/gen/autoscaler1_beta2-cli/src/main.rs +++ b/gen/autoscaler1_beta2-cli/src/main.rs @@ -1219,10 +1219,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/autoscaler1_beta2/Cargo.toml b/gen/autoscaler1_beta2/Cargo.toml index dd417e9557..52f968bd46 100644 --- a/gen/autoscaler1_beta2/Cargo.toml +++ b/gen/autoscaler1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/bigquery2-cli/Cargo.toml b/gen/bigquery2-cli/Cargo.toml index baf07bc610..c21987d1cb 100644 --- a/gen/bigquery2-cli/Cargo.toml +++ b/gen/bigquery2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["bigquery", "google", "cli"] name = "bigquery2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/bigquery2-cli/src/main.rs b/gen/bigquery2-cli/src/main.rs index a1b71faa2d..16b5758ea5 100644 --- a/gen/bigquery2-cli/src/main.rs +++ b/gen/bigquery2-cli/src/main.rs @@ -2518,10 +2518,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/bigquery2/Cargo.toml b/gen/bigquery2/Cargo.toml index c002f48945..d6d4514b14 100644 --- a/gen/bigquery2/Cargo.toml +++ b/gen/bigquery2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/bigquery2/src/lib.rs.in b/gen/bigquery2/src/lib.rs.in index 9e8bf437da..0a840eee8e 100644 --- a/gen/bigquery2/src/lib.rs.in +++ b/gen/bigquery2/src/lib.rs.in @@ -6781,15 +6781,12 @@ impl<'a, C, A> JobInsertCall<'a, C, A> where C: BorrowMut, A: oau if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/blogger3-cli/Cargo.toml b/gen/blogger3-cli/Cargo.toml index 078c791bf2..f9da0cdcfa 100644 --- a/gen/blogger3-cli/Cargo.toml +++ b/gen/blogger3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["blogger", "google", "cli"] name = "blogger3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/blogger3-cli/src/main.rs b/gen/blogger3-cli/src/main.rs index 893c4e69a2..98c982da79 100644 --- a/gen/blogger3-cli/src/main.rs +++ b/gen/blogger3-cli/src/main.rs @@ -3520,10 +3520,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/blogger3/Cargo.toml b/gen/blogger3/Cargo.toml index 8d480001af..eab74c839c 100644 --- a/gen/blogger3/Cargo.toml +++ b/gen/blogger3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/books1-cli/Cargo.toml b/gen/books1-cli/Cargo.toml index 515ab07c67..d1d2572e4f 100644 --- a/gen/books1-cli/Cargo.toml +++ b/gen/books1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["books", "google", "cli"] name = "books1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/books1-cli/src/main.rs b/gen/books1-cli/src/main.rs index 07388e6fc6..6e9681e6ea 100644 --- a/gen/books1-cli/src/main.rs +++ b/gen/books1-cli/src/main.rs @@ -4352,10 +4352,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/books1/Cargo.toml b/gen/books1/Cargo.toml index b8991bae76..300a03cbe7 100644 --- a/gen/books1/Cargo.toml +++ b/gen/books1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/calendar3-cli/Cargo.toml b/gen/calendar3-cli/Cargo.toml index 8cd8a25005..864babbab4 100644 --- a/gen/calendar3-cli/Cargo.toml +++ b/gen/calendar3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["calendar", "google", "cli"] name = "calendar3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/calendar3-cli/src/main.rs b/gen/calendar3-cli/src/main.rs index 792f733b67..d0a6af0cf2 100644 --- a/gen/calendar3-cli/src/main.rs +++ b/gen/calendar3-cli/src/main.rs @@ -4396,10 +4396,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/calendar3/Cargo.toml b/gen/calendar3/Cargo.toml index 22e779e7f1..6ebf63a8db 100644 --- a/gen/calendar3/Cargo.toml +++ b/gen/calendar3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/civicinfo2-cli/Cargo.toml b/gen/civicinfo2-cli/Cargo.toml index 8ce1042f0d..3a1da85a55 100644 --- a/gen/civicinfo2-cli/Cargo.toml +++ b/gen/civicinfo2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["civicinfo", "google", "cli"] name = "civicinfo2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/civicinfo2-cli/src/main.rs b/gen/civicinfo2-cli/src/main.rs index d63a2332c2..060b76197a 100644 --- a/gen/civicinfo2-cli/src/main.rs +++ b/gen/civicinfo2-cli/src/main.rs @@ -574,10 +574,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/civicinfo2/Cargo.toml b/gen/civicinfo2/Cargo.toml index 52f1ba508f..c6c3b29c68 100644 --- a/gen/civicinfo2/Cargo.toml +++ b/gen/civicinfo2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/cloudlatencytest2-cli/Cargo.toml b/gen/cloudlatencytest2-cli/Cargo.toml index 53857c2667..ec51839a0e 100644 --- a/gen/cloudlatencytest2-cli/Cargo.toml +++ b/gen/cloudlatencytest2-cli/Cargo.toml @@ -16,13 +16,13 @@ keywords = ["cloudlatencytest", "google", "cli"] name = "cloudlatencytest2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/cloudlatencytest2-cli/src/main.rs b/gen/cloudlatencytest2-cli/src/main.rs index 0de6153866..539bd38478 100644 --- a/gen/cloudlatencytest2-cli/src/main.rs +++ b/gen/cloudlatencytest2-cli/src/main.rs @@ -390,10 +390,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/cloudlatencytest2/Cargo.toml b/gen/cloudlatencytest2/Cargo.toml index 5bfeb20eef..eddfa9eda2 100644 --- a/gen/cloudlatencytest2/Cargo.toml +++ b/gen/cloudlatencytest2/Cargo.toml @@ -15,7 +15,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/cloudmonitoring2_beta2-cli/Cargo.toml b/gen/cloudmonitoring2_beta2-cli/Cargo.toml index ffc0b6f743..bfb43e8123 100644 --- a/gen/cloudmonitoring2_beta2-cli/Cargo.toml +++ b/gen/cloudmonitoring2_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["cloudmonitoring", "google", "cli"] name = "cloudmonitoring2-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/cloudmonitoring2_beta2-cli/src/main.rs b/gen/cloudmonitoring2_beta2-cli/src/main.rs index 7637e3a2ef..d914518c33 100644 --- a/gen/cloudmonitoring2_beta2-cli/src/main.rs +++ b/gen/cloudmonitoring2_beta2-cli/src/main.rs @@ -938,10 +938,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/cloudmonitoring2_beta2/Cargo.toml b/gen/cloudmonitoring2_beta2/Cargo.toml index 87b4f1d64f..d7e6b78870 100644 --- a/gen/cloudmonitoring2_beta2/Cargo.toml +++ b/gen/cloudmonitoring2_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml index 8f126a03c0..fb12182165 100644 --- a/gen/cloudresourcemanager1_beta1-cli/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["cloudresourcemanager", "google", "cli"] name = "cloudresourcemanager1-beta1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/cloudresourcemanager1_beta1-cli/src/main.rs b/gen/cloudresourcemanager1_beta1-cli/src/main.rs index 2c4fa9addd..9634512e2a 100644 --- a/gen/cloudresourcemanager1_beta1-cli/src/main.rs +++ b/gen/cloudresourcemanager1_beta1-cli/src/main.rs @@ -723,10 +723,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/cloudresourcemanager1_beta1/Cargo.toml b/gen/cloudresourcemanager1_beta1/Cargo.toml index 20b1cd4166..3f7ce7d247 100644 --- a/gen/cloudresourcemanager1_beta1/Cargo.toml +++ b/gen/cloudresourcemanager1_beta1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/compute1-cli/Cargo.toml b/gen/compute1-cli/Cargo.toml index 1224a12c4c..aae9a82fc8 100644 --- a/gen/compute1-cli/Cargo.toml +++ b/gen/compute1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["compute", "google", "cli"] name = "compute1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/compute1-cli/src/main.rs b/gen/compute1-cli/src/main.rs index 91c0e0543e..411a1af9b2 100644 --- a/gen/compute1-cli/src/main.rs +++ b/gen/compute1-cli/src/main.rs @@ -15236,10 +15236,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/compute1/Cargo.toml b/gen/compute1/Cargo.toml index d4ed5701a1..5f9d9158c4 100644 --- a/gen/compute1/Cargo.toml +++ b/gen/compute1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/container1_beta1-cli/Cargo.toml b/gen/container1_beta1-cli/Cargo.toml index 289bc45c02..e9af4d4b15 100644 --- a/gen/container1_beta1-cli/Cargo.toml +++ b/gen/container1_beta1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["container", "google", "cli"] name = "container1-beta1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/container1_beta1-cli/src/main.rs b/gen/container1_beta1-cli/src/main.rs index 00d794fafa..3274c11882 100644 --- a/gen/container1_beta1-cli/src/main.rs +++ b/gen/container1_beta1-cli/src/main.rs @@ -912,10 +912,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/container1_beta1/Cargo.toml b/gen/container1_beta1/Cargo.toml index 43c23fcf93..8c7822056c 100644 --- a/gen/container1_beta1/Cargo.toml +++ b/gen/container1_beta1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/content2-cli/Cargo.toml b/gen/content2-cli/Cargo.toml index 07bd86941d..35e6f7eeef 100644 --- a/gen/content2-cli/Cargo.toml +++ b/gen/content2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["content", "google", "cli"] name = "content2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/content2-cli/src/main.rs b/gen/content2-cli/src/main.rs index 8b7d08fd00..3e60f331e6 100644 --- a/gen/content2-cli/src/main.rs +++ b/gen/content2-cli/src/main.rs @@ -4497,10 +4497,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/content2/Cargo.toml b/gen/content2/Cargo.toml index eaccddeaa4..37113ef25d 100644 --- a/gen/content2/Cargo.toml +++ b/gen/content2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/coordinate1-cli/Cargo.toml b/gen/coordinate1-cli/Cargo.toml index bc57b5b4d8..f3d0e75967 100644 --- a/gen/coordinate1-cli/Cargo.toml +++ b/gen/coordinate1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["coordinate", "google", "cli"] name = "coordinate1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/coordinate1-cli/src/main.rs b/gen/coordinate1-cli/src/main.rs index a7a2cce801..39ce08890b 100644 --- a/gen/coordinate1-cli/src/main.rs +++ b/gen/coordinate1-cli/src/main.rs @@ -1591,10 +1591,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/coordinate1/Cargo.toml b/gen/coordinate1/Cargo.toml index ef23b4680c..e2d0dbb11d 100644 --- a/gen/coordinate1/Cargo.toml +++ b/gen/coordinate1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/customsearch1-cli/Cargo.toml b/gen/customsearch1-cli/Cargo.toml index 38cc26fa33..9b72eb61d3 100644 --- a/gen/customsearch1-cli/Cargo.toml +++ b/gen/customsearch1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["customsearch", "google", "cli"] name = "customsearch1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/customsearch1-cli/src/main.rs b/gen/customsearch1-cli/src/main.rs index 185fded2c7..02a37cb20a 100644 --- a/gen/customsearch1-cli/src/main.rs +++ b/gen/customsearch1-cli/src/main.rs @@ -334,10 +334,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/customsearch1/Cargo.toml b/gen/customsearch1/Cargo.toml index c8d2086f3f..29797ab2b5 100644 --- a/gen/customsearch1/Cargo.toml +++ b/gen/customsearch1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/datastore1_beta2-cli/Cargo.toml b/gen/datastore1_beta2-cli/Cargo.toml index 60aca65373..5bc6ef1911 100644 --- a/gen/datastore1_beta2-cli/Cargo.toml +++ b/gen/datastore1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["datastore", "google", "cli"] name = "datastore1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/datastore1_beta2-cli/src/main.rs b/gen/datastore1_beta2-cli/src/main.rs index 8b88b3a2d4..f9358114fd 100644 --- a/gen/datastore1_beta2-cli/src/main.rs +++ b/gen/datastore1_beta2-cli/src/main.rs @@ -895,10 +895,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/datastore1_beta2/Cargo.toml b/gen/datastore1_beta2/Cargo.toml index 8dd581fadb..a28a4f1eaf 100644 --- a/gen/datastore1_beta2/Cargo.toml +++ b/gen/datastore1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/deploymentmanager2_beta2-cli/Cargo.toml b/gen/deploymentmanager2_beta2-cli/Cargo.toml index 8cafdc4495..25ccf18ffa 100644 --- a/gen/deploymentmanager2_beta2-cli/Cargo.toml +++ b/gen/deploymentmanager2_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["deploymentmanager", "google", "cli"] name = "deploymentmanager2-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/deploymentmanager2_beta2-cli/src/main.rs b/gen/deploymentmanager2_beta2-cli/src/main.rs index ec930ba434..2ec9d7d033 100644 --- a/gen/deploymentmanager2_beta2-cli/src/main.rs +++ b/gen/deploymentmanager2_beta2-cli/src/main.rs @@ -1502,10 +1502,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/deploymentmanager2_beta2/Cargo.toml b/gen/deploymentmanager2_beta2/Cargo.toml index d4a0410096..505cd06382 100644 --- a/gen/deploymentmanager2_beta2/Cargo.toml +++ b/gen/deploymentmanager2_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/dfareporting2d1-cli/Cargo.toml b/gen/dfareporting2d1-cli/Cargo.toml index b54412a54f..91fb627cf1 100644 --- a/gen/dfareporting2d1-cli/Cargo.toml +++ b/gen/dfareporting2d1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["dfareporting", "google", "cli"] name = "dfareporting2d1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/dfareporting2d1-cli/src/main.rs b/gen/dfareporting2d1-cli/src/main.rs index 2f6dbcdb20..892966ca29 100644 --- a/gen/dfareporting2d1-cli/src/main.rs +++ b/gen/dfareporting2d1-cli/src/main.rs @@ -22338,10 +22338,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/dfareporting2d1/Cargo.toml b/gen/dfareporting2d1/Cargo.toml index 70041efb54..c952d38260 100644 --- a/gen/dfareporting2d1/Cargo.toml +++ b/gen/dfareporting2d1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/dfareporting2d1/src/lib.rs.in b/gen/dfareporting2d1/src/lib.rs.in index f3ccd4647f..3f8b5c66e2 100644 --- a/gen/dfareporting2d1/src/lib.rs.in +++ b/gen/dfareporting2d1/src/lib.rs.in @@ -20988,15 +20988,12 @@ impl<'a, C, A> CreativeAssetInsertCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/discovery1-cli/Cargo.toml b/gen/discovery1-cli/Cargo.toml index 408e7309e4..e2772cea30 100644 --- a/gen/discovery1-cli/Cargo.toml +++ b/gen/discovery1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["discovery", "google", "cli"] name = "discovery1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/discovery1-cli/src/main.rs b/gen/discovery1-cli/src/main.rs index 5f4c0a2759..fdd82b9598 100644 --- a/gen/discovery1-cli/src/main.rs +++ b/gen/discovery1-cli/src/main.rs @@ -321,10 +321,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/discovery1/Cargo.toml b/gen/discovery1/Cargo.toml index 93e534c8a2..a6b9578e27 100644 --- a/gen/discovery1/Cargo.toml +++ b/gen/discovery1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/dns1-cli/Cargo.toml b/gen/dns1-cli/Cargo.toml index 168cf06a7d..0abe11edf1 100644 --- a/gen/dns1-cli/Cargo.toml +++ b/gen/dns1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["dns", "google", "cli"] name = "dns1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/dns1-cli/src/main.rs b/gen/dns1-cli/src/main.rs index c54af30888..59fd0aa051 100644 --- a/gen/dns1-cli/src/main.rs +++ b/gen/dns1-cli/src/main.rs @@ -1046,10 +1046,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/dns1/Cargo.toml b/gen/dns1/Cargo.toml index b22a910dc9..db8190962c 100644 --- a/gen/dns1/Cargo.toml +++ b/gen/dns1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/doubleclickbidmanager1-cli/Cargo.toml b/gen/doubleclickbidmanager1-cli/Cargo.toml index fe84b7d910..468e161cfc 100644 --- a/gen/doubleclickbidmanager1-cli/Cargo.toml +++ b/gen/doubleclickbidmanager1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["doubleclickbidmanage", "google", "cli"] name = "doubleclickbidmanager1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/doubleclickbidmanager1-cli/src/main.rs b/gen/doubleclickbidmanager1-cli/src/main.rs index 7cf241be46..146551d7bd 100644 --- a/gen/doubleclickbidmanager1-cli/src/main.rs +++ b/gen/doubleclickbidmanager1-cli/src/main.rs @@ -914,10 +914,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/doubleclickbidmanager1/Cargo.toml b/gen/doubleclickbidmanager1/Cargo.toml index 81f5641fb3..a8d8c71373 100644 --- a/gen/doubleclickbidmanager1/Cargo.toml +++ b/gen/doubleclickbidmanager1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/doubleclicksearch2-cli/Cargo.toml b/gen/doubleclicksearch2-cli/Cargo.toml index 16f8835f0c..90d9a068b0 100644 --- a/gen/doubleclicksearch2-cli/Cargo.toml +++ b/gen/doubleclicksearch2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["doubleclicksearch", "google", "cli"] name = "doubleclicksearch2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/doubleclicksearch2-cli/src/main.rs b/gen/doubleclicksearch2-cli/src/main.rs index 2d5fd6ef0d..fcfe21cd53 100644 --- a/gen/doubleclicksearch2-cli/src/main.rs +++ b/gen/doubleclicksearch2-cli/src/main.rs @@ -1315,10 +1315,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/doubleclicksearch2/Cargo.toml b/gen/doubleclicksearch2/Cargo.toml index b768766c47..5e52e2c497 100644 --- a/gen/doubleclicksearch2/Cargo.toml +++ b/gen/doubleclicksearch2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/drive2-cli/Cargo.toml b/gen/drive2-cli/Cargo.toml index 5cfa3d8679..ba30d89963 100644 --- a/gen/drive2-cli/Cargo.toml +++ b/gen/drive2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["drive", "google", "cli"] name = "drive2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/drive2-cli/src/main.rs b/gen/drive2-cli/src/main.rs index b923cafee5..f8fd075246 100644 --- a/gen/drive2-cli/src/main.rs +++ b/gen/drive2-cli/src/main.rs @@ -6703,10 +6703,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/drive2/Cargo.toml b/gen/drive2/Cargo.toml index 9819a55131..701308db45 100644 --- a/gen/drive2/Cargo.toml +++ b/gen/drive2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/drive2/src/lib.rs.in b/gen/drive2/src/lib.rs.in index fa0f43e1b3..4533562e4c 100644 --- a/gen/drive2/src/lib.rs.in +++ b/gen/drive2/src/lib.rs.in @@ -3875,15 +3875,12 @@ impl<'a, C, A> FileInsertCall<'a, C, A> where C: BorrowMut, A: oa if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -5891,15 +5888,12 @@ impl<'a, C, A> FileUpdateCall<'a, C, A> where C: BorrowMut, A: oa if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -7524,15 +7518,12 @@ impl<'a, C, A> RealtimeUpdateCall<'a, C, A> where C: BorrowMut, A if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url) diff --git a/gen/fitness1-cli/Cargo.toml b/gen/fitness1-cli/Cargo.toml index 9e2eb7e30a..0741d84bbe 100644 --- a/gen/fitness1-cli/Cargo.toml +++ b/gen/fitness1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["fitness", "google", "cli"] name = "fitness1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/fitness1-cli/src/main.rs b/gen/fitness1-cli/src/main.rs index 6ca730c0a8..d9a2da5e23 100644 --- a/gen/fitness1-cli/src/main.rs +++ b/gen/fitness1-cli/src/main.rs @@ -1554,10 +1554,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/fitness1/Cargo.toml b/gen/fitness1/Cargo.toml index f27c61da32..1033f18b1b 100644 --- a/gen/fitness1/Cargo.toml +++ b/gen/fitness1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/freebase1-cli/Cargo.toml b/gen/freebase1-cli/Cargo.toml index d78b55b22d..c4f30f6820 100644 --- a/gen/freebase1-cli/Cargo.toml +++ b/gen/freebase1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["freebase", "google", "cli"] name = "freebase1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/freebase1-cli/src/main.rs b/gen/freebase1-cli/src/main.rs index d315b6fbef..e95875d74d 100644 --- a/gen/freebase1-cli/src/main.rs +++ b/gen/freebase1-cli/src/main.rs @@ -396,10 +396,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/freebase1/Cargo.toml b/gen/freebase1/Cargo.toml index bc73f94557..00157bee9c 100644 --- a/gen/freebase1/Cargo.toml +++ b/gen/freebase1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/freebase1_sandbox-cli/Cargo.toml b/gen/freebase1_sandbox-cli/Cargo.toml index 03740593e8..a8115daebf 100644 --- a/gen/freebase1_sandbox-cli/Cargo.toml +++ b/gen/freebase1_sandbox-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["freebase", "google", "cli"] name = "freebase1-sandbox" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/freebase1_sandbox-cli/src/main.rs b/gen/freebase1_sandbox-cli/src/main.rs index eaca19f058..49ecbb92e3 100644 --- a/gen/freebase1_sandbox-cli/src/main.rs +++ b/gen/freebase1_sandbox-cli/src/main.rs @@ -396,10 +396,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/freebase1_sandbox/Cargo.toml b/gen/freebase1_sandbox/Cargo.toml index 6a0a75032e..3ccf942d36 100644 --- a/gen/freebase1_sandbox/Cargo.toml +++ b/gen/freebase1_sandbox/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/fusiontables2-cli/Cargo.toml b/gen/fusiontables2-cli/Cargo.toml index 1c0188d471..5f382a8f53 100644 --- a/gen/fusiontables2-cli/Cargo.toml +++ b/gen/fusiontables2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["fusiontables", "google", "cli"] name = "fusiontables2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/fusiontables2-cli/src/main.rs b/gen/fusiontables2-cli/src/main.rs index 68b5bea0cf..7105bb779d 100644 --- a/gen/fusiontables2-cli/src/main.rs +++ b/gen/fusiontables2-cli/src/main.rs @@ -3609,10 +3609,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/fusiontables2/Cargo.toml b/gen/fusiontables2/Cargo.toml index 5c0cbcbf3a..875ad8a2d5 100644 --- a/gen/fusiontables2/Cargo.toml +++ b/gen/fusiontables2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/fusiontables2/src/lib.rs.in b/gen/fusiontables2/src/lib.rs.in index 4dee7e932c..311620267f 100644 --- a/gen/fusiontables2/src/lib.rs.in +++ b/gen/fusiontables2/src/lib.rs.in @@ -8088,15 +8088,12 @@ impl<'a, C, A> TableReplaceRowCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -9697,15 +9694,12 @@ impl<'a, C, A> TableImportRowCall<'a, C, A> where C: BorrowMut, A if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -10069,15 +10063,12 @@ impl<'a, C, A> TableImportTableCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/games1-cli/Cargo.toml b/gen/games1-cli/Cargo.toml index 287c60d50c..fed99164b0 100644 --- a/gen/games1-cli/Cargo.toml +++ b/gen/games1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["games", "google", "cli"] name = "games1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/games1-cli/src/main.rs b/gen/games1-cli/src/main.rs index 102da1fb65..febf4cbc40 100644 --- a/gen/games1-cli/src/main.rs +++ b/gen/games1-cli/src/main.rs @@ -5033,10 +5033,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/games1/Cargo.toml b/gen/games1/Cargo.toml index e418f5e42a..a3abe8a1ac 100644 --- a/gen/games1/Cargo.toml +++ b/gen/games1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/gamesconfiguration1_configuration-cli/Cargo.toml b/gen/gamesconfiguration1_configuration-cli/Cargo.toml index 5c7581660a..90235f1e9f 100644 --- a/gen/gamesconfiguration1_configuration-cli/Cargo.toml +++ b/gen/gamesconfiguration1_configuration-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["gamesConfiguration", "google", "cli"] name = "gamesconfiguration1-configuration" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/gamesconfiguration1_configuration-cli/src/main.rs b/gen/gamesconfiguration1_configuration-cli/src/main.rs index 3cdab8e331..39f1fdb65b 100644 --- a/gen/gamesconfiguration1_configuration-cli/src/main.rs +++ b/gen/gamesconfiguration1_configuration-cli/src/main.rs @@ -1575,10 +1575,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/gamesconfiguration1_configuration/Cargo.toml b/gen/gamesconfiguration1_configuration/Cargo.toml index 1693769518..789babb82f 100644 --- a/gen/gamesconfiguration1_configuration/Cargo.toml +++ b/gen/gamesconfiguration1_configuration/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/gamesconfiguration1_configuration/src/lib.rs.in b/gen/gamesconfiguration1_configuration/src/lib.rs.in index 80caa8f573..d87e6cd8a1 100644 --- a/gen/gamesconfiguration1_configuration/src/lib.rs.in +++ b/gen/gamesconfiguration1_configuration/src/lib.rs.in @@ -965,15 +965,12 @@ impl<'a, C, A> ImageConfigurationUploadCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/gamesmanagement1_management-cli/Cargo.toml b/gen/gamesmanagement1_management-cli/Cargo.toml index 39ebecd632..727e927512 100644 --- a/gen/gamesmanagement1_management-cli/Cargo.toml +++ b/gen/gamesmanagement1_management-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["gamesManagement", "google", "cli"] name = "gamesmanagement1-management" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/gamesmanagement1_management-cli/src/main.rs b/gen/gamesmanagement1_management-cli/src/main.rs index 1fcee07eae..2de99f1384 100644 --- a/gen/gamesmanagement1_management-cli/src/main.rs +++ b/gen/gamesmanagement1_management-cli/src/main.rs @@ -2102,10 +2102,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/gamesmanagement1_management/Cargo.toml b/gen/gamesmanagement1_management/Cargo.toml index ff29701e2c..49a141f0b3 100644 --- a/gen/gamesmanagement1_management/Cargo.toml +++ b/gen/gamesmanagement1_management/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/gan1_beta1-cli/Cargo.toml b/gen/gan1_beta1-cli/Cargo.toml index b43803c783..871261053e 100644 --- a/gen/gan1_beta1-cli/Cargo.toml +++ b/gen/gan1_beta1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["gan", "google", "cli"] name = "gan1-beta1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/gan1_beta1-cli/src/main.rs b/gen/gan1_beta1-cli/src/main.rs index eae4568127..2aa584f945 100644 --- a/gen/gan1_beta1-cli/src/main.rs +++ b/gen/gan1_beta1-cli/src/main.rs @@ -1281,10 +1281,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/gan1_beta1/Cargo.toml b/gen/gan1_beta1/Cargo.toml index 94413c0294..47fa7eedc4 100644 --- a/gen/gan1_beta1/Cargo.toml +++ b/gen/gan1_beta1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/gmail1-cli/Cargo.toml b/gen/gmail1-cli/Cargo.toml index b0661fe53d..027be1e571 100644 --- a/gen/gmail1-cli/Cargo.toml +++ b/gen/gmail1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["gmail", "google", "cli"] name = "gmail1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/gmail1-cli/src/main.rs b/gen/gmail1-cli/src/main.rs index 28307bb40b..43de254949 100644 --- a/gen/gmail1-cli/src/main.rs +++ b/gen/gmail1-cli/src/main.rs @@ -3407,10 +3407,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/gmail1/Cargo.toml b/gen/gmail1/Cargo.toml index 21a6334efb..8a4551d3f8 100644 --- a/gen/gmail1/Cargo.toml +++ b/gen/gmail1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/gmail1/src/lib.rs.in b/gen/gmail1/src/lib.rs.in index 8ad9d08c97..571bf1b066 100644 --- a/gen/gmail1/src/lib.rs.in +++ b/gen/gmail1/src/lib.rs.in @@ -1793,15 +1793,12 @@ impl<'a, C, A> UserMessageImportCall<'a, C, A> where C: BorrowMut if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -2489,15 +2486,12 @@ impl<'a, C, A> UserDraftCreateCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -3873,15 +3867,12 @@ impl<'a, C, A> UserDraftSendCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -4980,15 +4971,12 @@ impl<'a, C, A> UserDraftUpdateCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -8808,15 +8796,12 @@ impl<'a, C, A> UserMessageSendCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -10293,15 +10278,12 @@ impl<'a, C, A> UserMessageInsertCall<'a, C, A> where C: BorrowMut if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/groupsmigration1-cli/Cargo.toml b/gen/groupsmigration1-cli/Cargo.toml index 14c8a1fc08..00f0fd8f09 100644 --- a/gen/groupsmigration1-cli/Cargo.toml +++ b/gen/groupsmigration1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["groupsmigration", "google", "cli"] name = "groupsmigration1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/groupsmigration1-cli/src/main.rs b/gen/groupsmigration1-cli/src/main.rs index c8f7931988..d40935b2f7 100644 --- a/gen/groupsmigration1-cli/src/main.rs +++ b/gen/groupsmigration1-cli/src/main.rs @@ -259,10 +259,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/groupsmigration1/Cargo.toml b/gen/groupsmigration1/Cargo.toml index b09c1e4a64..85a61c7f8f 100644 --- a/gen/groupsmigration1/Cargo.toml +++ b/gen/groupsmigration1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/groupsmigration1/src/lib.rs.in b/gen/groupsmigration1/src/lib.rs.in index de36be4131..ff07df8c91 100644 --- a/gen/groupsmigration1/src/lib.rs.in +++ b/gen/groupsmigration1/src/lib.rs.in @@ -375,15 +375,12 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) diff --git a/gen/groupssettings1-cli/Cargo.toml b/gen/groupssettings1-cli/Cargo.toml index 241de9b618..a9ced59493 100644 --- a/gen/groupssettings1-cli/Cargo.toml +++ b/gen/groupssettings1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["groupssettings", "google", "cli"] name = "groupssettings1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/groupssettings1-cli/src/main.rs b/gen/groupssettings1-cli/src/main.rs index 154c63d8e0..babf9cd0df 100644 --- a/gen/groupssettings1-cli/src/main.rs +++ b/gen/groupssettings1-cli/src/main.rs @@ -534,10 +534,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/groupssettings1/Cargo.toml b/gen/groupssettings1/Cargo.toml index 2bb862544b..dcd8f621ae 100644 --- a/gen/groupssettings1/Cargo.toml +++ b/gen/groupssettings1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/identitytoolkit3-cli/Cargo.toml b/gen/identitytoolkit3-cli/Cargo.toml index 1e7ce7428e..7bb3624a7f 100644 --- a/gen/identitytoolkit3-cli/Cargo.toml +++ b/gen/identitytoolkit3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["identitytoolkit", "google", "cli"] name = "identitytoolkit3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/identitytoolkit3-cli/src/main.rs b/gen/identitytoolkit3-cli/src/main.rs index 5d1705157b..fb18098776 100644 --- a/gen/identitytoolkit3-cli/src/main.rs +++ b/gen/identitytoolkit3-cli/src/main.rs @@ -1417,10 +1417,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/identitytoolkit3/Cargo.toml b/gen/identitytoolkit3/Cargo.toml index 0e951b92cf..668d9a11e2 100644 --- a/gen/identitytoolkit3/Cargo.toml +++ b/gen/identitytoolkit3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/licensing1-cli/Cargo.toml b/gen/licensing1-cli/Cargo.toml index 7a6212e237..cc2252ee69 100644 --- a/gen/licensing1-cli/Cargo.toml +++ b/gen/licensing1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["licensing", "google", "cli"] name = "licensing1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/licensing1-cli/src/main.rs b/gen/licensing1-cli/src/main.rs index 408817e7bb..436723f9db 100644 --- a/gen/licensing1-cli/src/main.rs +++ b/gen/licensing1-cli/src/main.rs @@ -909,10 +909,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/licensing1/Cargo.toml b/gen/licensing1/Cargo.toml index 71bc8cc240..d6cb3191b4 100644 --- a/gen/licensing1/Cargo.toml +++ b/gen/licensing1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/logging1_beta3-cli/Cargo.toml b/gen/logging1_beta3-cli/Cargo.toml index 6e21b7ffae..f8850ac65a 100644 --- a/gen/logging1_beta3-cli/Cargo.toml +++ b/gen/logging1_beta3-cli/Cargo.toml @@ -16,13 +16,13 @@ keywords = ["logging", "google", "cli"] name = "logging1-beta3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/logging1_beta3-cli/src/main.rs b/gen/logging1_beta3-cli/src/main.rs index 1099c3a882..43f8d4aa1a 100644 --- a/gen/logging1_beta3-cli/src/main.rs +++ b/gen/logging1_beta3-cli/src/main.rs @@ -1680,10 +1680,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/logging1_beta3/Cargo.toml b/gen/logging1_beta3/Cargo.toml index 2e87b90854..8ea4ad2d46 100644 --- a/gen/logging1_beta3/Cargo.toml +++ b/gen/logging1_beta3/Cargo.toml @@ -15,7 +15,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/manager1_beta2-cli/Cargo.toml b/gen/manager1_beta2-cli/Cargo.toml index 2d59f07796..fbba1f2144 100644 --- a/gen/manager1_beta2-cli/Cargo.toml +++ b/gen/manager1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["manager", "google", "cli"] name = "manager1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/manager1_beta2-cli/src/main.rs b/gen/manager1_beta2-cli/src/main.rs index e7a6c1509d..52d6bf8efd 100644 --- a/gen/manager1_beta2-cli/src/main.rs +++ b/gen/manager1_beta2-cli/src/main.rs @@ -916,10 +916,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/manager1_beta2/Cargo.toml b/gen/manager1_beta2/Cargo.toml index 9bde318a75..cd13b31a94 100644 --- a/gen/manager1_beta2/Cargo.toml +++ b/gen/manager1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/mapsengine1-cli/Cargo.toml b/gen/mapsengine1-cli/Cargo.toml index c4e84c9aa7..38da241e37 100644 --- a/gen/mapsengine1-cli/Cargo.toml +++ b/gen/mapsengine1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["mapsengine", "google", "cli"] name = "mapsengine1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/mapsengine1-cli/src/main.rs b/gen/mapsengine1-cli/src/main.rs index 0d3dc5e81a..cfcb448fc9 100644 --- a/gen/mapsengine1-cli/src/main.rs +++ b/gen/mapsengine1-cli/src/main.rs @@ -7598,10 +7598,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/mapsengine1/Cargo.toml b/gen/mapsengine1/Cargo.toml index 93112d4f3f..ceff5d3cb6 100644 --- a/gen/mapsengine1/Cargo.toml +++ b/gen/mapsengine1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/mapsengine1/src/lib.rs.in b/gen/mapsengine1/src/lib.rs.in index 2c094bcb4c..7a0e8084f9 100644 --- a/gen/mapsengine1/src/lib.rs.in +++ b/gen/mapsengine1/src/lib.rs.in @@ -9055,15 +9055,12 @@ impl<'a, C, A> RasterFileInsertCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -12045,15 +12042,12 @@ impl<'a, C, A> TableFileInsertCall<'a, C, A> where C: BorrowMut, if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -23457,15 +23451,12 @@ impl<'a, C, A> ProjectIconCreateCall<'a, C, A> where C: BorrowMut if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/mirror1-cli/Cargo.toml b/gen/mirror1-cli/Cargo.toml index 081990eec8..d34d61d737 100644 --- a/gen/mirror1-cli/Cargo.toml +++ b/gen/mirror1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["mirror", "google", "cli"] name = "mirror1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/mirror1-cli/src/main.rs b/gen/mirror1-cli/src/main.rs index 01d74b2eaa..8a0d28eae8 100644 --- a/gen/mirror1-cli/src/main.rs +++ b/gen/mirror1-cli/src/main.rs @@ -2587,10 +2587,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/mirror1/Cargo.toml b/gen/mirror1/Cargo.toml index bb6dbc7a3e..1b5e048467 100644 --- a/gen/mirror1/Cargo.toml +++ b/gen/mirror1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/mirror1/src/lib.rs.in b/gen/mirror1/src/lib.rs.in index 0cee1cb360..77d8e2e345 100644 --- a/gen/mirror1/src/lib.rs.in +++ b/gen/mirror1/src/lib.rs.in @@ -2768,15 +2768,12 @@ impl<'a, C, A> TimelineInsertCall<'a, C, A> where C: BorrowMut, A if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -3677,15 +3674,12 @@ impl<'a, C, A> TimelineAttachmentInsertCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -4506,15 +4500,12 @@ impl<'a, C, A> TimelineUpdateCall<'a, C, A> where C: BorrowMut, A if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/oauth2_v2-cli/Cargo.toml b/gen/oauth2_v2-cli/Cargo.toml index 748206c70b..2b3f8f7022 100644 --- a/gen/oauth2_v2-cli/Cargo.toml +++ b/gen/oauth2_v2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["oauth2", "google", "cli"] name = "oauth2-v2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/oauth2_v2-cli/src/main.rs b/gen/oauth2_v2-cli/src/main.rs index 2c4d09dbef..6dfefdca14 100644 --- a/gen/oauth2_v2-cli/src/main.rs +++ b/gen/oauth2_v2-cli/src/main.rs @@ -470,10 +470,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/oauth2_v2/Cargo.toml b/gen/oauth2_v2/Cargo.toml index e65fcb7145..7af03e2a0a 100644 --- a/gen/oauth2_v2/Cargo.toml +++ b/gen/oauth2_v2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/pagespeedonline2-cli/Cargo.toml b/gen/pagespeedonline2-cli/Cargo.toml index 98ad4b9c5f..67263bc035 100644 --- a/gen/pagespeedonline2-cli/Cargo.toml +++ b/gen/pagespeedonline2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["pagespeedonline", "google", "cli"] name = "pagespeedonline2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/pagespeedonline2-cli/src/main.rs b/gen/pagespeedonline2-cli/src/main.rs index 4388edaa22..35c33385d9 100644 --- a/gen/pagespeedonline2-cli/src/main.rs +++ b/gen/pagespeedonline2-cli/src/main.rs @@ -256,10 +256,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/pagespeedonline2/Cargo.toml b/gen/pagespeedonline2/Cargo.toml index e7aead602f..9985f8d607 100644 --- a/gen/pagespeedonline2/Cargo.toml +++ b/gen/pagespeedonline2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/plus1-cli/Cargo.toml b/gen/plus1-cli/Cargo.toml index 2092263f4e..f81923d508 100644 --- a/gen/plus1-cli/Cargo.toml +++ b/gen/plus1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["plus", "google", "cli"] name = "plus1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/plus1-cli/src/main.rs b/gen/plus1-cli/src/main.rs index 3b1349b5a9..3c5b101364 100644 --- a/gen/plus1-cli/src/main.rs +++ b/gen/plus1-cli/src/main.rs @@ -1380,10 +1380,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/plus1/Cargo.toml b/gen/plus1/Cargo.toml index ea9941d4e3..b05eac7cb4 100644 --- a/gen/plus1/Cargo.toml +++ b/gen/plus1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/plusdomains1-cli/Cargo.toml b/gen/plusdomains1-cli/Cargo.toml index 3afe3e96d3..b9cd655a29 100644 --- a/gen/plusdomains1-cli/Cargo.toml +++ b/gen/plusdomains1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["plusDomains", "google", "cli"] name = "plusdomains1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/plusdomains1-cli/src/main.rs b/gen/plusdomains1-cli/src/main.rs index d7bd65a845..0f0845b1d6 100644 --- a/gen/plusdomains1-cli/src/main.rs +++ b/gen/plusdomains1-cli/src/main.rs @@ -2181,10 +2181,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/plusdomains1/Cargo.toml b/gen/plusdomains1/Cargo.toml index ab0732029d..70efe13af4 100644 --- a/gen/plusdomains1/Cargo.toml +++ b/gen/plusdomains1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/plusdomains1/src/lib.rs.in b/gen/plusdomains1/src/lib.rs.in index 785587e3bc..02da968711 100644 --- a/gen/plusdomains1/src/lib.rs.in +++ b/gen/plusdomains1/src/lib.rs.in @@ -6237,15 +6237,12 @@ impl<'a, C, A> MediaInsertCall<'a, C, A> where C: BorrowMut, A: o if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/prediction1d6-cli/Cargo.toml b/gen/prediction1d6-cli/Cargo.toml index 82d2dec79f..01562d8ea9 100644 --- a/gen/prediction1d6-cli/Cargo.toml +++ b/gen/prediction1d6-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["prediction", "google", "cli"] name = "prediction1d6" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/prediction1d6-cli/src/main.rs b/gen/prediction1d6-cli/src/main.rs index 00f2c49b0d..a749865cbe 100644 --- a/gen/prediction1d6-cli/src/main.rs +++ b/gen/prediction1d6-cli/src/main.rs @@ -986,10 +986,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/prediction1d6/Cargo.toml b/gen/prediction1d6/Cargo.toml index 456120485b..dee12fc96d 100644 --- a/gen/prediction1d6/Cargo.toml +++ b/gen/prediction1d6/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/pubsub1_beta2-cli/Cargo.toml b/gen/pubsub1_beta2-cli/Cargo.toml index b125a38040..7409e71ef2 100644 --- a/gen/pubsub1_beta2-cli/Cargo.toml +++ b/gen/pubsub1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["pubsub", "google", "cli"] name = "pubsub1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/pubsub1_beta2-cli/src/main.rs b/gen/pubsub1_beta2-cli/src/main.rs index 8c169320fa..806de98310 100644 --- a/gen/pubsub1_beta2-cli/src/main.rs +++ b/gen/pubsub1_beta2-cli/src/main.rs @@ -2174,10 +2174,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/pubsub1_beta2/Cargo.toml b/gen/pubsub1_beta2/Cargo.toml index decd4260d3..93c334e5ed 100644 --- a/gen/pubsub1_beta2/Cargo.toml +++ b/gen/pubsub1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/qpxexpress1-cli/Cargo.toml b/gen/qpxexpress1-cli/Cargo.toml index ab2c880d72..391427e005 100644 --- a/gen/qpxexpress1-cli/Cargo.toml +++ b/gen/qpxexpress1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["qpxExpress", "google", "cli"] name = "qpxexpress1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/qpxexpress1-cli/src/main.rs b/gen/qpxexpress1-cli/src/main.rs index c1f160d197..71e7c0f4fb 100644 --- a/gen/qpxexpress1-cli/src/main.rs +++ b/gen/qpxexpress1-cli/src/main.rs @@ -282,10 +282,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/qpxexpress1/Cargo.toml b/gen/qpxexpress1/Cargo.toml index eeda27bf8d..4fef2d7362 100644 --- a/gen/qpxexpress1/Cargo.toml +++ b/gen/qpxexpress1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/replicapool1_beta2-cli/Cargo.toml b/gen/replicapool1_beta2-cli/Cargo.toml index b6b2703b84..771ee076ff 100644 --- a/gen/replicapool1_beta2-cli/Cargo.toml +++ b/gen/replicapool1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["replicapool", "google", "cli"] name = "replicapool1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/replicapool1_beta2-cli/src/main.rs b/gen/replicapool1_beta2-cli/src/main.rs index 475dac73c6..ac91e97240 100644 --- a/gen/replicapool1_beta2-cli/src/main.rs +++ b/gen/replicapool1_beta2-cli/src/main.rs @@ -1513,10 +1513,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/replicapool1_beta2/Cargo.toml b/gen/replicapool1_beta2/Cargo.toml index 8a2a86df40..ddcee45875 100644 --- a/gen/replicapool1_beta2/Cargo.toml +++ b/gen/replicapool1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/replicapoolupdater1_beta1-cli/Cargo.toml b/gen/replicapoolupdater1_beta1-cli/Cargo.toml index 99a252f40b..b18d6aa9aa 100644 --- a/gen/replicapoolupdater1_beta1-cli/Cargo.toml +++ b/gen/replicapoolupdater1_beta1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["replicapoolupdater", "google", "cli"] name = "replicapoolupdater1-beta1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/replicapoolupdater1_beta1-cli/src/main.rs b/gen/replicapoolupdater1_beta1-cli/src/main.rs index 35b61ba9c7..8a246fd8ac 100644 --- a/gen/replicapoolupdater1_beta1-cli/src/main.rs +++ b/gen/replicapoolupdater1_beta1-cli/src/main.rs @@ -1050,10 +1050,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/replicapoolupdater1_beta1/Cargo.toml b/gen/replicapoolupdater1_beta1/Cargo.toml index d992ff2b54..2c54b8dff2 100644 --- a/gen/replicapoolupdater1_beta1/Cargo.toml +++ b/gen/replicapoolupdater1_beta1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/reseller1_sandbox-cli/Cargo.toml b/gen/reseller1_sandbox-cli/Cargo.toml index ebba031d7c..bd966fd25c 100644 --- a/gen/reseller1_sandbox-cli/Cargo.toml +++ b/gen/reseller1_sandbox-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["reseller", "google", "cli"] name = "reseller1-sandbox" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/reseller1_sandbox-cli/src/main.rs b/gen/reseller1_sandbox-cli/src/main.rs index 52952f3155..8dcce674f9 100644 --- a/gen/reseller1_sandbox-cli/src/main.rs +++ b/gen/reseller1_sandbox-cli/src/main.rs @@ -1663,10 +1663,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/reseller1_sandbox/Cargo.toml b/gen/reseller1_sandbox/Cargo.toml index 15edc23e49..6ec63e9bdd 100644 --- a/gen/reseller1_sandbox/Cargo.toml +++ b/gen/reseller1_sandbox/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/resourceviews1_beta2-cli/Cargo.toml b/gen/resourceviews1_beta2-cli/Cargo.toml index d6d4f400f5..3ca344b83d 100644 --- a/gen/resourceviews1_beta2-cli/Cargo.toml +++ b/gen/resourceviews1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["resourceviews", "google", "cli"] name = "resourceviews1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/resourceviews1_beta2-cli/src/main.rs b/gen/resourceviews1_beta2-cli/src/main.rs index 1a8f23c710..6ea559f440 100644 --- a/gen/resourceviews1_beta2-cli/src/main.rs +++ b/gen/resourceviews1_beta2-cli/src/main.rs @@ -1346,10 +1346,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/resourceviews1_beta2/Cargo.toml b/gen/resourceviews1_beta2/Cargo.toml index 17b7fccef8..e40984823d 100644 --- a/gen/resourceviews1_beta2/Cargo.toml +++ b/gen/resourceviews1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/siteverification1-cli/Cargo.toml b/gen/siteverification1-cli/Cargo.toml index ea3a2d94bb..705cd57e42 100644 --- a/gen/siteverification1-cli/Cargo.toml +++ b/gen/siteverification1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["siteVerification", "google", "cli"] name = "siteverification1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/siteverification1-cli/src/main.rs b/gen/siteverification1-cli/src/main.rs index 534886eacb..fd48aca1e2 100644 --- a/gen/siteverification1-cli/src/main.rs +++ b/gen/siteverification1-cli/src/main.rs @@ -851,10 +851,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/siteverification1/Cargo.toml b/gen/siteverification1/Cargo.toml index 1f3158bca3..769be87890 100644 --- a/gen/siteverification1/Cargo.toml +++ b/gen/siteverification1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/spectrum1_explorer-cli/Cargo.toml b/gen/spectrum1_explorer-cli/Cargo.toml index 0934099bbe..8e02c3f32a 100644 --- a/gen/spectrum1_explorer-cli/Cargo.toml +++ b/gen/spectrum1_explorer-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["spectrum", "google", "cli"] name = "spectrum1-explorer" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/spectrum1_explorer-cli/src/main.rs b/gen/spectrum1_explorer-cli/src/main.rs index 90322d4ee4..38630d19cc 100644 --- a/gen/spectrum1_explorer-cli/src/main.rs +++ b/gen/spectrum1_explorer-cli/src/main.rs @@ -979,10 +979,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/spectrum1_explorer/Cargo.toml b/gen/spectrum1_explorer/Cargo.toml index 114702a48c..56dafca6f3 100644 --- a/gen/spectrum1_explorer/Cargo.toml +++ b/gen/spectrum1_explorer/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/sqladmin1_beta4-cli/Cargo.toml b/gen/sqladmin1_beta4-cli/Cargo.toml index 5b820c6d14..e930129288 100644 --- a/gen/sqladmin1_beta4-cli/Cargo.toml +++ b/gen/sqladmin1_beta4-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["sqladmin", "google", "cli"] name = "sqladmin1-beta4" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/sqladmin1_beta4-cli/src/main.rs b/gen/sqladmin1_beta4-cli/src/main.rs index 7e279b9767..8368644df3 100644 --- a/gen/sqladmin1_beta4-cli/src/main.rs +++ b/gen/sqladmin1_beta4-cli/src/main.rs @@ -3931,10 +3931,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/sqladmin1_beta4/Cargo.toml b/gen/sqladmin1_beta4/Cargo.toml index d4ae703e55..1ccd80b805 100644 --- a/gen/sqladmin1_beta4/Cargo.toml +++ b/gen/sqladmin1_beta4/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/storage1-cli/Cargo.toml b/gen/storage1-cli/Cargo.toml index 5df0070c38..78c883f13e 100644 --- a/gen/storage1-cli/Cargo.toml +++ b/gen/storage1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["storage", "google", "cli"] name = "storage1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/storage1-cli/src/main.rs b/gen/storage1-cli/src/main.rs index ce93b60b6f..8b79708c9d 100644 --- a/gen/storage1-cli/src/main.rs +++ b/gen/storage1-cli/src/main.rs @@ -4479,10 +4479,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/storage1/Cargo.toml b/gen/storage1/Cargo.toml index 2b914947fe..29508185db 100644 --- a/gen/storage1/Cargo.toml +++ b/gen/storage1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/storage1/src/lib.rs.in b/gen/storage1/src/lib.rs.in index 836ba671e0..a7d636ee53 100644 --- a/gen/storage1/src/lib.rs.in +++ b/gen/storage1/src/lib.rs.in @@ -7025,15 +7025,12 @@ impl<'a, C, A> ObjectInsertCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/tagmanager1-cli/Cargo.toml b/gen/tagmanager1-cli/Cargo.toml index 5252a751f4..56caffd1e3 100644 --- a/gen/tagmanager1-cli/Cargo.toml +++ b/gen/tagmanager1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["tagmanager", "google", "cli"] name = "tagmanager1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/tagmanager1-cli/src/main.rs b/gen/tagmanager1-cli/src/main.rs index 4441fff68b..d11daae877 100644 --- a/gen/tagmanager1-cli/src/main.rs +++ b/gen/tagmanager1-cli/src/main.rs @@ -4852,10 +4852,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/tagmanager1/Cargo.toml b/gen/tagmanager1/Cargo.toml index 723a0b4f98..f24af55514 100644 --- a/gen/tagmanager1/Cargo.toml +++ b/gen/tagmanager1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/taskqueue1_beta2-cli/Cargo.toml b/gen/taskqueue1_beta2-cli/Cargo.toml index 62953a0103..8e34281e01 100644 --- a/gen/taskqueue1_beta2-cli/Cargo.toml +++ b/gen/taskqueue1_beta2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["taskqueue", "google", "cli"] name = "taskqueue1-beta2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/taskqueue1_beta2-cli/src/main.rs b/gen/taskqueue1_beta2-cli/src/main.rs index 8c7efebe0c..f2b6514eb7 100644 --- a/gen/taskqueue1_beta2-cli/src/main.rs +++ b/gen/taskqueue1_beta2-cli/src/main.rs @@ -1033,10 +1033,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/taskqueue1_beta2/Cargo.toml b/gen/taskqueue1_beta2/Cargo.toml index 3a961d4cc9..b064b74479 100644 --- a/gen/taskqueue1_beta2/Cargo.toml +++ b/gen/taskqueue1_beta2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/tasks1-cli/Cargo.toml b/gen/tasks1-cli/Cargo.toml index 898f68c6eb..bf69e699f7 100644 --- a/gen/tasks1-cli/Cargo.toml +++ b/gen/tasks1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["tasks", "google", "cli"] name = "tasks1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/tasks1-cli/src/main.rs b/gen/tasks1-cli/src/main.rs index bf92a7550a..1dec0b6ebd 100644 --- a/gen/tasks1-cli/src/main.rs +++ b/gen/tasks1-cli/src/main.rs @@ -1576,10 +1576,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/tasks1/Cargo.toml b/gen/tasks1/Cargo.toml index 086c473e45..d16a5083b8 100644 --- a/gen/tasks1/Cargo.toml +++ b/gen/tasks1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/translate2-cli/Cargo.toml b/gen/translate2-cli/Cargo.toml index 4d7935c784..0fde60d643 100644 --- a/gen/translate2-cli/Cargo.toml +++ b/gen/translate2-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["translate", "google", "cli"] name = "translate2" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/translate2-cli/src/main.rs b/gen/translate2-cli/src/main.rs index f3d82bbed0..c9e6b8751c 100644 --- a/gen/translate2-cli/src/main.rs +++ b/gen/translate2-cli/src/main.rs @@ -424,10 +424,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/translate2/Cargo.toml b/gen/translate2/Cargo.toml index 684935f603..22c572bcfb 100644 --- a/gen/translate2/Cargo.toml +++ b/gen/translate2/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/urlshortener1-cli/Cargo.toml b/gen/urlshortener1-cli/Cargo.toml index 77f97c4c4d..f39ec9f111 100644 --- a/gen/urlshortener1-cli/Cargo.toml +++ b/gen/urlshortener1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["urlshortener", "google", "cli"] name = "urlshortener1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/urlshortener1-cli/src/main.rs b/gen/urlshortener1-cli/src/main.rs index f55c651271..3d82835dc5 100644 --- a/gen/urlshortener1-cli/src/main.rs +++ b/gen/urlshortener1-cli/src/main.rs @@ -454,10 +454,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/urlshortener1/Cargo.toml b/gen/urlshortener1/Cargo.toml index cbae07cf76..04cbcd4b19 100644 --- a/gen/urlshortener1/Cargo.toml +++ b/gen/urlshortener1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/webfonts1-cli/Cargo.toml b/gen/webfonts1-cli/Cargo.toml index 9e02b771bb..7e93c26a29 100644 --- a/gen/webfonts1-cli/Cargo.toml +++ b/gen/webfonts1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["webfonts", "google", "cli"] name = "webfonts1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/webfonts1-cli/src/main.rs b/gen/webfonts1-cli/src/main.rs index f67ef5b263..a01af48e9c 100644 --- a/gen/webfonts1-cli/src/main.rs +++ b/gen/webfonts1-cli/src/main.rs @@ -238,10 +238,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/webfonts1/Cargo.toml b/gen/webfonts1/Cargo.toml index 4b67b018ff..c55a03c219 100644 --- a/gen/webfonts1/Cargo.toml +++ b/gen/webfonts1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/webmasters3-cli/Cargo.toml b/gen/webmasters3-cli/Cargo.toml index d0324a954d..6b342855bd 100644 --- a/gen/webmasters3-cli/Cargo.toml +++ b/gen/webmasters3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["webmasters", "google", "cli"] name = "webmasters3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/webmasters3-cli/src/main.rs b/gen/webmasters3-cli/src/main.rs index 5b5dba44e1..9dcf1ab3bd 100644 --- a/gen/webmasters3-cli/src/main.rs +++ b/gen/webmasters3-cli/src/main.rs @@ -1132,10 +1132,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/webmasters3/Cargo.toml b/gen/webmasters3/Cargo.toml index 1cece196f4..253bf3d017 100644 --- a/gen/webmasters3/Cargo.toml +++ b/gen/webmasters3/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/youtube3-cli/Cargo.toml b/gen/youtube3-cli/Cargo.toml index ca314bd9da..08480a6a24 100644 --- a/gen/youtube3-cli/Cargo.toml +++ b/gen/youtube3-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["youtube", "google", "cli"] name = "youtube3" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/youtube3-cli/src/main.rs b/gen/youtube3-cli/src/main.rs index d72dbf36fd..bb4f3209ac 100644 --- a/gen/youtube3-cli/src/main.rs +++ b/gen/youtube3-cli/src/main.rs @@ -7387,10 +7387,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/youtube3/cargo.toml b/gen/youtube3/cargo.toml index f0ff56e041..b06de5caf5 100644 --- a/gen/youtube3/cargo.toml +++ b/gen/youtube3/cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" diff --git a/gen/youtube3/src/lib.rs.in b/gen/youtube3/src/lib.rs.in index 74d5e17949..4631828ca8 100644 --- a/gen/youtube3/src/lib.rs.in +++ b/gen/youtube3/src/lib.rs.in @@ -7348,15 +7348,12 @@ impl<'a, C, A> ChannelBannerInsertCall<'a, C, A> where C: BorrowMut { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -10160,15 +10157,12 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut client = &mut *self.hub.client.borrow_mut(); let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url) @@ -12070,15 +12064,12 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut, A: o if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -19442,15 +19433,12 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -22392,15 +22380,12 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { @@ -23399,15 +23384,12 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut, A: if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() { should_ask_dlg_for_url = false; upload_url_from_server = false; - let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream)); - match response { - Ok(ref mut res) => { - res.status = hyper::status::StatusCode::Ok; - res.headers.set(Location(upload_url.as_ref().unwrap().clone())) - } - _ => unreachable!(), - } - response + let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap(); + hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| { + res.status = hyper::status::StatusCode::Ok; + res.headers.set(Location(upload_url.as_ref().unwrap().clone())); + Ok(res) + }) } else { let mut mp_reader: MultiPartReader = Default::default(); let (mut body_reader, content_type) = match protocol { diff --git a/gen/youtubeanalytics1-cli/Cargo.toml b/gen/youtubeanalytics1-cli/Cargo.toml index 8bdca1a8ff..2429fd9f26 100644 --- a/gen/youtubeanalytics1-cli/Cargo.toml +++ b/gen/youtubeanalytics1-cli/Cargo.toml @@ -17,13 +17,13 @@ keywords = ["youtubeAnalytics", "google", "cli"] name = "youtubeanalytics1" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*" strsim = "*" yup-hyper-mock = ">=1.0.0" -clap = ">= 0.9.1" +clap = ">= 1.0.3" [build-dependencies] syntex = { version = "*" } diff --git a/gen/youtubeanalytics1-cli/src/main.rs b/gen/youtubeanalytics1-cli/src/main.rs index 1c074e0f01..abcbca8e82 100644 --- a/gen/youtubeanalytics1-cli/src/main.rs +++ b/gen/youtubeanalytics1-cli/src/main.rs @@ -1146,10 +1146,10 @@ fn main() { .takes_value(false)); for &(main_command_name, ref about, ref subcommands) in arg_data.iter() { - let mut mcmd = SubCommand::new(main_command_name).about(about); + let mut mcmd = SubCommand::with_name(main_command_name).about(about); for &(sub_command_name, ref desc, url_info, ref args) in subcommands { - let mut scmd = SubCommand::new(sub_command_name); + let mut scmd = SubCommand::with_name(sub_command_name); if let &Some(desc) = desc { scmd = scmd.about(desc); } diff --git a/gen/youtubeanalytics1/Cargo.toml b/gen/youtubeanalytics1/Cargo.toml index 986bbed67a..9ef9789ec6 100644 --- a/gen/youtubeanalytics1/Cargo.toml +++ b/gen/youtubeanalytics1/Cargo.toml @@ -16,7 +16,7 @@ build = "src/build.rs" [dependencies] -hyper = ">= 0.6.0" +hyper = ">= 0.6.4" mime = "0.0.12" serde = ">= 0.4.1" yup-oauth2 = "*"