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
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=""

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
// 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 {

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(),
};
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");
}