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 39982679d48..485c96eefcf 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 41e90c0076e..b7071896d5d 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 70c51c923ec..4f6b2424e8a 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 dedfe56ec26..630fcb40758 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 235cc112ae4..b6ce7b5e927 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 de843048782..4fbe881fcda 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 1cb69281c5f..3ba4b2de916 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 bd0ee2f3159..af65a0358bc 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 e63079d04f3..10710534a9f 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 1b61262fbfc..d4deffbfaf3 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 0a78ffd29a7..8ade569fe18 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 9d0c137d44f..30b64725926 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 8990e854caf..9b5a6d9ba01 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 3ecc908d319..25e690d613e 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 853a7c2f0bf..5686d7268d1 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 83e8e4e8971..11db4d9b381 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 8e1d783ed6e..38b93b8ce9b 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 965cbd9ab90..a8d378969e6 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 8a5ed0a22f9..07bdce6120b 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 e21c36f1104..fa1ca55637b 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 262f6e1b767..08ae445dab1 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 42d7eedb55f..03e8c56f94f 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 476598fa79a..42181041d2e 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 944de95b8d1..1a5881e8c82 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 55789da1ac2..ec293f9699e 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 923fae41ace..6ef0c1304fd 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 ddfadb295ac..8e4ac3cb540 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 0ac4ecfcf29..d649b6ddcca 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 70046a344a6..c6c8de1ab72 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 2af578ae770..3072694a540 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 2dd62f5f5aa..8eff3779f8d 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 644110e12e9..00bc9e3fb1b 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 33944dde42a..aa562614d01 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 df649b60a70..66e3cf3bafa 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 6c501d013b7..4f710d959b7 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 d20cea91b33..1f50158700d 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 d1b7ad7f263..508577353f7 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 33605b3a812..07e5bb2a548 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 603f68e19d3..d483693e4d8 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 b889219e02a..e5277b00e30 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 5e75ca65c5a..4933386542a 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 da210262766..66c8d813efe 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 8318478a478..c3f2f4f6ee4 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 f589ef5e2f2..2552e5c285b 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 dd417e95572..52f968bd46b 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 baf07bc610f..c21987d1cbb 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 a1b71faa2df..16b5758ea54 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 c002f489454..d6d4514b14c 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 9e8bf437da9..0a840eee8e4 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 078c791bf29..f9da0cdcfab 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 893c4e69a2f..98c982da791 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 8d480001af0..eab74c839c1 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 515ab07c676..d1d2572e4fa 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 07388e6fc63..6e9681e6eaa 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 b8991bae763..300a03cbe7f 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 8cd8a250059..864babbab4c 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 792f733b670..d0a6af0cf2a 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 22e779e7f16..6ebf63a8dbc 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 8ce1042f0d6..3a1da85a55d 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 d63a2332c21..060b76197a9 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 52f1ba508f5..c6c3b29c68e 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 53857c26679..ec51839a0ee 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 0de61538665..539bd384783 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 5bfeb20eefd..eddfa9eda25 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 ffc0b6f7437..bfb43e8123e 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 7637e3a2ef3..d914518c33d 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 87b4f1d64f7..d7e6b78870a 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 8f126a03c08..fb121821653 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 2c4fa9adddd..9634512e2ae 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 20b1cd41664..3f7ce7d2474 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 1224a12c4c6..aae9a82fc8e 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 91c0e0543e3..411a1af9b2e 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 d4ed5701a18..5f9d9158c4f 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 289bc45c024..e9af4d4b152 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 00d794fafa2..3274c118825 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 43c23fcf933..8c7822056c5 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 07bd86941db..35e6f7eeef6 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 8b7d08fd00d..3e60f331e6a 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 eaccddeaa4e..37113ef25df 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 bc57b5b4d84..f3d0e75967d 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 a7a2cce801e..39ce08890b1 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 ef23b4680c0..e2d0dbb11dd 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 38cc26fa331..9b72eb61d32 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 185fded2c79..02a37cb20a4 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 c8d2086f3f1..29797ab2b5f 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 60aca653733..5bc6ef19115 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 8b88b3a2d41..f9358114fd0 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 8dd581fadbf..a28a4f1eaf2 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 8cafdc44955..25ccf18ffab 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 ec930ba434e..2ec9d7d0337 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 d4a0410096a..505cd06382f 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 b54412a54fd..91fb627cf13 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 2f6dbcdb20b..892966ca29e 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 70041efb543..c952d38260a 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 f3ccd4647ff..3f8b5c66e22 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 408e7309e45..e2772cea30c 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 5f4c0a27594..fdd82b9598b 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 93e534c8a28..a6b9578e279 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 168cf06a7d1..0abe11edf16 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 c54af308882..59fd0aa0519 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 b22a910dc96..db8190962c7 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 fe84b7d910e..468e161cfc3 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 7cf241be460..146551d7bd3 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 81f5641fb35..a8d8c713735 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 16f8835f0c0..90d9a068b04 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 2d5fd6ef0df..fcfe21cd53c 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 b768766c473..5e52e2c497e 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 5cfa3d86795..ba30d89963b 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 b923cafee54..f8fd075246f 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 9819a55131a..701308db450 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 fa0f43e1b31..4533562e4cf 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 9e2eb7e30ae..0741d84bbe0 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 6ca730c0a8b..d9a2da5e232 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 f27c61da320..1033f18b1b7 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 d78b55b22d2..c4f30f68208 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 d315b6fbef8..e95875d74d6 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 bc73f945574..00157bee9cc 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 03740593e8a..a8115daebf7 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 eaca19f0581..49ecbb92e3d 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 6a0a75032e5..3ccf942d363 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 1c0188d4710..5f382a8f53b 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 68b5bea0cf8..7105bb779db 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 5c0cbcbf3af..875ad8a2d55 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 4dee7e932cc..311620267f8 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 287c60d50c8..fed99164b02 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 102da1fb659..febf4cbc405 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 e418f5e42ad..a3abe8a1ac1 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 5c7581660ac..90235f1e9fe 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 3cdab8e3315..39f1fdb65b0 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 16937695182..789babb82f9 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 80caa8f5730..d87e6cd8a1d 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 39ebecd632d..727e9275129 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 1fcee07eaed..2de99f13843 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 ff29701e2c1..49a141f0b3d 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 b43803c7836..871261053e6 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 eae45681277..2aa584f945c 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 94413c02945..47fa7eedc4e 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 b0661fe53d7..027be1e571c 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 28307bb40bc..43de254949c 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 21a6334efb9..8a4551d3f81 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 8ad9d08c97e..571bf1b0662 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 14c8a1fc082..00f0fd8f09c 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 c8f7931988a..d40935b2f76 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 b09c1e4a648..85a61c7f8f1 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 de36be41314..ff07df8c913 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 241de9b6183..a9ced59493a 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 154c63d8e0f..babf9cd0dff 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 2bb862544b6..dcd8f621ae8 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 1e7ce7428e6..7bb3624a7f2 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 5d1705157b0..fb180987764 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 0e951b92cf9..668d9a11e2a 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 7a6212e2374..cc2252ee697 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 408817e7bbf..436723f9db2 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 71bc8cc2401..d6cb3191b4c 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 6e21b7ffae1..f8850ac65ab 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 1099c3a882f..43f8d4aa1ac 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 2e87b908541..8ea4ad2d465 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 2d59f077969..fbba1f21443 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 e7a6c1509d9..52d6bf8efd1 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 9bde318a75e..cd13b31a94f 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 c4e84c9aa7e..38da241e37a 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 0d3dc5e81ad..cfcb448fc9a 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 93112d4f3fe..ceff5d3cb6f 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 2c094bcb4c9..7a0e8084f9d 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 081990eec81..d34d61d7375 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 01d74b2eaa4..8a0d28eae8e 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 bb6dbc7a3e9..1b5e0484670 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 0cee1cb3605..77d8e2e3459 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 748206c70b8..2b3f8f70223 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 2c4d09dbef2..6dfefdca14a 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 e65fcb71453..7af03e2a0a2 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 98ad4b9c5f7..67263bc0358 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 4388edaa220..35c33385d90 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 e7aead602ff..9985f8d6074 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 2092263f4eb..f81923d5085 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 3b1349b5a91..3c5b1013647 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 ea9941d4e3c..b05eac7cb48 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 3afe3e96d33..b9cd655a293 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 d7bd65a845e..0f0845b1d62 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 ab0732029d0..70efe13af42 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 785587e3bcc..02da968711f 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 82d2dec79f4..01562d8ea9a 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 00f2c49b0dd..a749865cbec 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 456120485b8..dee12fc96d8 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 b125a380401..7409e71ef27 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 8c169320fae..806de983102 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 decd4260d37..93c334e5ed3 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 ab2c880d722..391427e0056 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 c1f160d197e..71e7c0f4fbd 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 eeda27bf8da..4fef2d73627 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 b6b2703b841..771ee076ffb 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 475dac73c63..ac91e972405 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 8a2a86df40c..ddcee45875d 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 99a252f40b3..b18d6aa9aae 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 35b61ba9c7e..8a246fd8ac9 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 d992ff2b546..2c54b8dff28 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 ebba031d7c7..bd966fd25cf 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 52952f3155b..8dcce674f98 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 15edc23e497..6ec63e9bdd1 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 d6d4f400f5b..3ca344b83d6 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 1a8f23c7102..6ea559f440a 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 17b7fccef85..e40984823de 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 ea3a2d94bbe..705cd57e42a 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 534886eacba..fd48aca1e2c 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 1f3158bca32..769be87890f 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 0934099bbe1..8e02c3f32aa 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 90322d4ee45..38630d19ccf 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 114702a48ca..56dafca6f37 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 5b820c6d141..e9301292884 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 7e279b9767e..8368644df3e 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 d4ae703e55b..1ccd80b805a 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 5df0070c388..78c883f13ef 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 ce93b60b6fd..8b79708c9dd 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 2b914947fe5..29508185dbf 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 836ba671e00..a7d636ee534 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 5252a751f43..56caffd1e3e 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 4441fff68ba..d11daae877a 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 723a0b4f983..f24af555145 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 62953a01037..8e34281e01c 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 8c7efebe0c6..f2b6514eb70 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 3a961d4cc9d..b064b744799 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 898f68c6eb6..bf69e699f7a 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 bf92a7550aa..1dec0b6ebd3 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 086c473e456..d16a5083b80 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 4d7935c784d..0fde60d643b 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 f3d82bbed0f..c9e6b8751c7 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 684935f6032..22c572bcfb6 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 77f97c4c4d8..f39ec9f1113 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 f55c6512714..3d82835dc5f 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 cbae07cf76d..04cbcd4b19a 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 9e02b771bb9..7e93c26a299 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 f67ef5b2636..a01af48e9c0 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 4b67b018ffc..c55a03c219e 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 d0324a954dc..6b342855bdc 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 5b5dba44e17..9dcf1ab3bdc 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 1cece196f47..253bf3d0172 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 ca314bd9da9..08480a6a243 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 d72dbf36fd8..bb4f3209ac8 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 f0ff56e041e..b06de5caf5a 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 74d5e17949f..4631828ca88 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 8bdca1a8ffc..2429fd9f260 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 1c074e0f019..abcbca8e823 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 986bbed67ac..9ef9789ec6c 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 = "*"