From 1ac3bedc96b4007bc6e9f23604dfc2ef141bea57 Mon Sep 17 00:00:00 2001 From: Yong Wen Chua Date: Tue, 5 Sep 2017 13:19:22 +0800 Subject: [PATCH] Bump min Rust version --- .travis.yml | 6 +++--- build.rs | 4 ++-- rust-toolchain | 2 +- src/lib.rs | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b511ac..2b2f93b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false language: rust rust: -- nightly-2017-07-21 +- nightly-2017-09-05 addons: apt: packages: @@ -16,9 +16,9 @@ script: - | travis-cargo build -- --all-features --all && travis-cargo test -- --all-features --all && - travis-cargo --only nightly-2017-07-21 doc -- --no-deps --all-features --all + travis-cargo --only nightly-2017-09-05 doc -- --no-deps --all-features --all after_success: -- travis-cargo --only nightly-2017-07-21 doc-upload +- travis-cargo --only nightly-2017-09-05 doc-upload env: global: - TRAVIS_CARGO_NIGHTLY_FEATURE="" diff --git a/build.rs b/build.rs index 4385c34..e8700f6 100644 --- a/build.rs +++ b/build.rs @@ -11,8 +11,8 @@ use version_check::{is_nightly, is_min_version, is_min_date}; // Specifies the minimum nightly version that is targetted // Note that sometimes the `rustc` date might be older than the nightly version, // usually one day older -const MIN_DATE: &'static str = "2017-07-20"; -const MIN_VERSION: &'static str = "1.20.0-nightly"; +const MIN_DATE: &'static str = "2017-09-04"; +const MIN_VERSION: &'static str = "1.22.0-nightly"; // Convenience macro for writing to stderr. macro_rules! printerr { diff --git a/rust-toolchain b/rust-toolchain index 253d1d7..2a4213e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2017-07-21 +nightly-2017-09-05 diff --git a/src/lib.rs b/src/lib.rs index abf1f0e..060b331 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1164,10 +1164,10 @@ impl Response { AllOrSome::Some(ref origin) => origin.origin().unicode_serialization(), }; - response.set_raw_header("Access-Control-Allow-Origin", origin); + let _ = response.set_raw_header("Access-Control-Allow-Origin", origin); if self.allow_credentials { - response.set_raw_header("Access-Control-Allow-Credentials", "true"); + let _ = response.set_raw_header("Access-Control-Allow-Credentials", "true"); } else { response.remove_header("Access-Control-Allow-Credentials"); } @@ -1179,7 +1179,7 @@ impl Response { .collect(); let headers = headers.join(", "); - response.set_raw_header("Access-Control-Expose-Headers", headers); + let _ = response.set_raw_header("Access-Control-Expose-Headers", headers); } else { response.remove_header("Access-Control-Expose-Headers"); } @@ -1191,7 +1191,7 @@ impl Response { .collect(); let headers = headers.join(", "); - response.set_raw_header("Access-Control-Allow-Headers", headers); + let _ = response.set_raw_header("Access-Control-Allow-Headers", headers); } else { response.remove_header("Access-Control-Allow-Headers"); } @@ -1200,20 +1200,20 @@ impl Response { let methods: Vec<_> = self.allow_methods.iter().map(|m| m.as_str()).collect(); let methods = methods.join(", "); - response.set_raw_header("Access-Control-Allow-Methods", methods); + let _ = response.set_raw_header("Access-Control-Allow-Methods", methods); } else { response.remove_header("Access-Control-Allow-Methods"); } if self.max_age.is_some() { let max_age = self.max_age.unwrap(); - response.set_raw_header("Access-Control-Max-Age", max_age.to_string()); + let _ = response.set_raw_header("Access-Control-Max-Age", max_age.to_string()); } else { response.remove_header("Access-Control-Max-Age"); } if self.vary_origin { - response.set_raw_header("Vary", "Origin"); + let _ = response.set_raw_header("Vary", "Origin"); } else { response.remove_header("Vary"); }