chore(travis): set minimum rust version

This commit is contained in:
Sean McArthur
2017-04-10 10:28:10 -07:00
parent 030393d099
commit f05a58a1b2
12 changed files with 20 additions and 34 deletions

View File

@@ -58,9 +58,9 @@ header! {
test_header!(
test2, vec![b"en-US, en; q=0.5, fr"],
Some(AcceptLanguage(vec![
qitem(langtag!(en;;;US)),
QualityItem::new(langtag!(en), Quality(500)),
qitem(langtag!(fr)),
qitem("en-US".parse().unwrap()),
QualityItem::new("en".parse().unwrap(), Quality(500)),
qitem("fr".parse().unwrap()),
])));
}
}

View File

@@ -24,7 +24,9 @@ use header::parsing::from_one_raw_str;
///
/// let mut headers = Headers::new();
/// headers.set(
/// Host::new("hyper.rs", 8080)
/// // In Rust 1.12+
/// // Host::new("hyper.rs", 8080)
/// Host::new("hyper.rs", Some(8080))
/// );
/// ```
#[derive(Clone, PartialEq, Debug)]
@@ -113,13 +115,13 @@ mod tests {
let host = Header::parse_header(&vec![b"foo.com:8080".to_vec()].into());
assert_eq!(host.ok(), Some(Host::new("foo.com", 8080)));
assert_eq!(host.ok(), Some(Host::new("foo.com", Some(8080))));
let host = Header::parse_header(&vec![b"foo.com".to_vec()].into());
assert_eq!(host.ok(), Some(Host::new("foo.com", None)));
let host = Header::parse_header(&vec![b"[::1]:8080".to_vec()].into());
assert_eq!(host.ok(), Some(Host::new("[::1]", 8080)));
assert_eq!(host.ok(), Some(Host::new("[::1]", Some(8080))));
let host = Header::parse_header(&vec![b"[::1]".to_vec()].into());
assert_eq!(host.ok(), Some(Host::new("[::1]", None)));

View File

@@ -982,7 +982,7 @@ mod tests {
.push_rel(RelationType::Previous)
.set_anchor("../anchor/example/")
.push_rev(RelationType::Next)
.push_href_lang(langtag!(de))
.push_href_lang("de".parse().unwrap())
.push_media_desc(MediaDesc::Screen)
.set_title("previous chapter")
.set_title_star("title* unparsed")
@@ -1042,7 +1042,7 @@ mod tests {
.push_rel(RelationType::Previous)
.set_anchor("/anchor/example/")
.push_rev(RelationType::Next)
.push_href_lang(langtag!(de))
.push_href_lang("de".parse().unwrap())
.push_media_desc(MediaDesc::Screen)
.set_title("previous chapter")
.set_title_star("title* unparsed")

View File

@@ -177,10 +177,11 @@ mod percent_encoding_http {
mod tests {
use header::shared::Charset;
use super::{ExtendedValue, parse_extended_value};
use language_tags::LanguageTag;
#[test]
fn test_parse_extended_value_with_encoding_and_language_tag() {
let expected_language_tag = langtag!(en);
let expected_language_tag = "en".parse::<LanguageTag>().unwrap();
// RFC 5987, Section 3.2.2
// Extended notation, using the Unicode character U+00A3 (POUND SIGN)
let result = parse_extended_value("iso-8859-1'en'%A3%20rates");

View File

@@ -458,7 +458,7 @@ mod tests {
let content_len = content.len();
for block_at in 0..content_len {
let actual = read_async(decoder.clone(), content.as_bytes(), block_at);
assert_eq!(expected, &actual, "Failed async. Blocking at {}", block_at);
assert_eq!(expected, &actual) //, "Failed async. Blocking at {}", block_at);
}
}

View File

@@ -131,7 +131,7 @@ pub trait Http1Transaction {
fn should_set_length(head: &MessageHead<Self::Outgoing>) -> bool;
}
type ParseResult<T> = ::Result<Option<(MessageHead<T>, usize)>>;
pub type ParseResult<T> = ::Result<Option<(MessageHead<T>, usize)>>;
struct DebugTruncate<'a>(&'a [u8]);

View File

@@ -18,7 +18,7 @@ extern crate bytes;
#[macro_use] extern crate futures;
extern crate futures_cpupool;
extern crate httparse;
#[cfg_attr(test, macro_use)] extern crate language_tags;
extern crate language_tags;
#[macro_use] extern crate log;
#[macro_use] pub extern crate mime;
extern crate base64;
@@ -56,13 +56,6 @@ macro_rules! unimplemented {
});
}
macro_rules! deprecated {
(#[$note:meta] $i:item) => (
#[cfg_attr(has_deprecated, $note)]
$i
);
}
#[cfg(test)]
mod mock;
pub mod client;

View File

@@ -553,6 +553,6 @@ fn test_uri_to_origin_form() {
for case in cases {
let uri = Uri::from_str(case.0).unwrap();
assert_eq!(origin_form(&uri), case.1, "{:?}", case);
assert_eq!(origin_form(&uri), case.1); //, "{:?}", case);
}
}