Bump min Rust version

This commit is contained in:
Yong Wen Chua 2017-09-05 13:19:22 +08:00
parent ede4b1a222
commit 1ac3bedc96
4 changed files with 13 additions and 13 deletions

View File

@ -1,7 +1,7 @@
sudo: false sudo: false
language: rust language: rust
rust: rust:
- nightly-2017-07-21 - nightly-2017-09-05
addons: addons:
apt: apt:
packages: packages:
@ -16,9 +16,9 @@ script:
- | - |
travis-cargo build -- --all-features --all && travis-cargo build -- --all-features --all &&
travis-cargo test -- --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: after_success:
- travis-cargo --only nightly-2017-07-21 doc-upload - travis-cargo --only nightly-2017-09-05 doc-upload
env: env:
global: global:
- TRAVIS_CARGO_NIGHTLY_FEATURE="" - TRAVIS_CARGO_NIGHTLY_FEATURE=""

View File

@ -11,8 +11,8 @@ use version_check::{is_nightly, is_min_version, is_min_date};
// Specifies the minimum nightly version that is targetted // Specifies the minimum nightly version that is targetted
// Note that sometimes the `rustc` date might be older than the nightly version, // Note that sometimes the `rustc` date might be older than the nightly version,
// usually one day older // usually one day older
const MIN_DATE: &'static str = "2017-07-20"; const MIN_DATE: &'static str = "2017-09-04";
const MIN_VERSION: &'static str = "1.20.0-nightly"; const MIN_VERSION: &'static str = "1.22.0-nightly";
// Convenience macro for writing to stderr. // Convenience macro for writing to stderr.
macro_rules! printerr { macro_rules! printerr {

View File

@ -1 +1 @@
nightly-2017-07-21 nightly-2017-09-05

View File

@ -1164,10 +1164,10 @@ impl Response {
AllOrSome::Some(ref origin) => origin.origin().unicode_serialization(), 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 { if self.allow_credentials {
response.set_raw_header("Access-Control-Allow-Credentials", "true"); let _ = response.set_raw_header("Access-Control-Allow-Credentials", "true");
} else { } else {
response.remove_header("Access-Control-Allow-Credentials"); response.remove_header("Access-Control-Allow-Credentials");
} }
@ -1179,7 +1179,7 @@ impl Response {
.collect(); .collect();
let headers = headers.join(", "); let headers = headers.join(", ");
response.set_raw_header("Access-Control-Expose-Headers", headers); let _ = response.set_raw_header("Access-Control-Expose-Headers", headers);
} else { } else {
response.remove_header("Access-Control-Expose-Headers"); response.remove_header("Access-Control-Expose-Headers");
} }
@ -1191,7 +1191,7 @@ impl Response {
.collect(); .collect();
let headers = headers.join(", "); let headers = headers.join(", ");
response.set_raw_header("Access-Control-Allow-Headers", headers); let _ = response.set_raw_header("Access-Control-Allow-Headers", headers);
} else { } else {
response.remove_header("Access-Control-Allow-Headers"); 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: Vec<_> = self.allow_methods.iter().map(|m| m.as_str()).collect();
let methods = methods.join(", "); let methods = methods.join(", ");
response.set_raw_header("Access-Control-Allow-Methods", methods); let _ = response.set_raw_header("Access-Control-Allow-Methods", methods);
} else { } else {
response.remove_header("Access-Control-Allow-Methods"); response.remove_header("Access-Control-Allow-Methods");
} }
if self.max_age.is_some() { if self.max_age.is_some() {
let max_age = self.max_age.unwrap(); 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 { } else {
response.remove_header("Access-Control-Max-Age"); response.remove_header("Access-Control-Max-Age");
} }
if self.vary_origin { if self.vary_origin {
response.set_raw_header("Vary", "Origin"); let _ = response.set_raw_header("Vary", "Origin");
} else { } else {
response.remove_header("Vary"); response.remove_header("Vary");
} }