chore(travis): set minimum rust version
This commit is contained in:
		| @@ -6,6 +6,7 @@ matrix: | |||||||
|           env: FEATURES="--features nightly" |           env: FEATURES="--features nightly" | ||||||
|         - rust: beta |         - rust: beta | ||||||
|         - rust: stable |         - rust: stable | ||||||
|  |         - rust: 1.10.0 | ||||||
|  |  | ||||||
| cache: | cache: | ||||||
|     apt: true |     apt: true | ||||||
|   | |||||||
| @@ -10,7 +10,6 @@ license = "MIT" | |||||||
| authors = ["Sean McArthur <sean.monstar@gmail.com>"] | authors = ["Sean McArthur <sean.monstar@gmail.com>"] | ||||||
| keywords = ["http", "hyper", "hyperium"] | keywords = ["http", "hyper", "hyperium"] | ||||||
| categories = ["web-programming::http-client", "web-programming::http-server"] | categories = ["web-programming::http-client", "web-programming::http-server"] | ||||||
| build = "build.rs" |  | ||||||
|  |  | ||||||
| include = [ | include = [ | ||||||
|   "build.rs", |   "build.rs", | ||||||
| @@ -41,9 +40,6 @@ num_cpus = "1.0" | |||||||
| pretty_env_logger = "0.1" | pretty_env_logger = "0.1" | ||||||
| spmc = "0.2" | spmc = "0.2" | ||||||
|  |  | ||||||
| [build-dependencies] |  | ||||||
| rustc_version = "0.1" |  | ||||||
|  |  | ||||||
| [features] | [features] | ||||||
| default = [] | default = [] | ||||||
| nightly = [] | nightly = [] | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								build.rs
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								build.rs
									
									
									
									
									
								
							| @@ -1,7 +0,0 @@ | |||||||
| extern crate rustc_version as rustc; |  | ||||||
|  |  | ||||||
| fn main() { |  | ||||||
|     if rustc::version_matches(">= 1.9") { |  | ||||||
|         println!("cargo:rustc-cfg=has_deprecated"); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @@ -58,9 +58,9 @@ header! { | |||||||
|         test_header!( |         test_header!( | ||||||
|             test2, vec![b"en-US, en; q=0.5, fr"], |             test2, vec![b"en-US, en; q=0.5, fr"], | ||||||
|             Some(AcceptLanguage(vec![ |             Some(AcceptLanguage(vec![ | ||||||
|                 qitem(langtag!(en;;;US)), |                 qitem("en-US".parse().unwrap()), | ||||||
|                 QualityItem::new(langtag!(en), Quality(500)), |                 QualityItem::new("en".parse().unwrap(), Quality(500)), | ||||||
|                 qitem(langtag!(fr)), |                 qitem("fr".parse().unwrap()), | ||||||
|         ]))); |         ]))); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -24,7 +24,9 @@ use header::parsing::from_one_raw_str; | |||||||
| /// | /// | ||||||
| /// let mut headers = Headers::new(); | /// let mut headers = Headers::new(); | ||||||
| /// headers.set( | /// 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)] | #[derive(Clone, PartialEq, Debug)] | ||||||
| @@ -113,13 +115,13 @@ mod tests { | |||||||
|  |  | ||||||
|  |  | ||||||
|         let host = Header::parse_header(&vec![b"foo.com:8080".to_vec()].into()); |         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()); |         let host = Header::parse_header(&vec![b"foo.com".to_vec()].into()); | ||||||
|         assert_eq!(host.ok(), Some(Host::new("foo.com", None))); |         assert_eq!(host.ok(), Some(Host::new("foo.com", None))); | ||||||
|  |  | ||||||
|         let host = Header::parse_header(&vec![b"[::1]:8080".to_vec()].into()); |         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()); |         let host = Header::parse_header(&vec![b"[::1]".to_vec()].into()); | ||||||
|         assert_eq!(host.ok(), Some(Host::new("[::1]", None))); |         assert_eq!(host.ok(), Some(Host::new("[::1]", None))); | ||||||
|   | |||||||
| @@ -982,7 +982,7 @@ mod tests { | |||||||
|             .push_rel(RelationType::Previous) |             .push_rel(RelationType::Previous) | ||||||
|             .set_anchor("../anchor/example/") |             .set_anchor("../anchor/example/") | ||||||
|             .push_rev(RelationType::Next) |             .push_rev(RelationType::Next) | ||||||
|             .push_href_lang(langtag!(de)) |             .push_href_lang("de".parse().unwrap()) | ||||||
|             .push_media_desc(MediaDesc::Screen) |             .push_media_desc(MediaDesc::Screen) | ||||||
|             .set_title("previous chapter") |             .set_title("previous chapter") | ||||||
|             .set_title_star("title* unparsed") |             .set_title_star("title* unparsed") | ||||||
| @@ -1042,7 +1042,7 @@ mod tests { | |||||||
|             .push_rel(RelationType::Previous) |             .push_rel(RelationType::Previous) | ||||||
|             .set_anchor("/anchor/example/") |             .set_anchor("/anchor/example/") | ||||||
|             .push_rev(RelationType::Next) |             .push_rev(RelationType::Next) | ||||||
|             .push_href_lang(langtag!(de)) |             .push_href_lang("de".parse().unwrap()) | ||||||
|             .push_media_desc(MediaDesc::Screen) |             .push_media_desc(MediaDesc::Screen) | ||||||
|             .set_title("previous chapter") |             .set_title("previous chapter") | ||||||
|             .set_title_star("title* unparsed") |             .set_title_star("title* unparsed") | ||||||
|   | |||||||
| @@ -177,10 +177,11 @@ mod percent_encoding_http { | |||||||
| mod tests { | mod tests { | ||||||
|     use header::shared::Charset; |     use header::shared::Charset; | ||||||
|     use super::{ExtendedValue, parse_extended_value}; |     use super::{ExtendedValue, parse_extended_value}; | ||||||
|  |     use language_tags::LanguageTag; | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|     fn test_parse_extended_value_with_encoding_and_language_tag() { |     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 |         // RFC 5987, Section 3.2.2 | ||||||
|         // Extended notation, using the Unicode character U+00A3 (POUND SIGN) |         // Extended notation, using the Unicode character U+00A3 (POUND SIGN) | ||||||
|         let result = parse_extended_value("iso-8859-1'en'%A3%20rates"); |         let result = parse_extended_value("iso-8859-1'en'%A3%20rates"); | ||||||
|   | |||||||
| @@ -458,7 +458,7 @@ mod tests { | |||||||
|         let content_len = content.len(); |         let content_len = content.len(); | ||||||
|         for block_at in 0..content_len { |         for block_at in 0..content_len { | ||||||
|             let actual = read_async(decoder.clone(), content.as_bytes(), block_at); |             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); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -131,7 +131,7 @@ pub trait Http1Transaction { | |||||||
|     fn should_set_length(head: &MessageHead<Self::Outgoing>) -> bool; |     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]); | struct DebugTruncate<'a>(&'a [u8]); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ extern crate bytes; | |||||||
| #[macro_use] extern crate futures; | #[macro_use] extern crate futures; | ||||||
| extern crate futures_cpupool; | extern crate futures_cpupool; | ||||||
| extern crate httparse; | extern crate httparse; | ||||||
| #[cfg_attr(test, macro_use)] extern crate language_tags; | extern crate language_tags; | ||||||
| #[macro_use] extern crate log; | #[macro_use] extern crate log; | ||||||
| #[macro_use] pub extern crate mime; | #[macro_use] pub extern crate mime; | ||||||
| extern crate base64; | 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)] | #[cfg(test)] | ||||||
| mod mock; | mod mock; | ||||||
| pub mod client; | pub mod client; | ||||||
|   | |||||||
| @@ -553,6 +553,6 @@ fn test_uri_to_origin_form() { | |||||||
|  |  | ||||||
|     for case in cases { |     for case in cases { | ||||||
|         let uri = Uri::from_str(case.0).unwrap(); |         let uri = Uri::from_str(case.0).unwrap(); | ||||||
|         assert_eq!(origin_form(&uri), case.1, "{:?}", case); |         assert_eq!(origin_form(&uri), case.1); //, "{:?}", case); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -78,7 +78,7 @@ macro_rules! test { | |||||||
|                 while n < buf.len() && n < expected.len() { |                 while n < buf.len() && n < expected.len() { | ||||||
|                     n += inc.read(&mut buf[n..]).unwrap(); |                     n += inc.read(&mut buf[n..]).unwrap(); | ||||||
|                 } |                 } | ||||||
|                 assert_eq!(s(&buf[..n]), expected, "expected is invalid"); |                 assert_eq!(s(&buf[..n]), expected); | ||||||
|  |  | ||||||
|                 inc.write_all($server_reply.as_ref()).unwrap(); |                 inc.write_all($server_reply.as_ref()).unwrap(); | ||||||
|                 let _ = tx.send(()); |                 let _ = tx.send(()); | ||||||
| @@ -89,9 +89,9 @@ macro_rules! test { | |||||||
|             let work = res.join(rx).map(|r| r.0); |             let work = res.join(rx).map(|r| r.0); | ||||||
|  |  | ||||||
|             let res = core.run(work).unwrap(); |             let res = core.run(work).unwrap(); | ||||||
|             assert_eq!(res.status(), StatusCode::$client_status, "status is invalid"); |             assert_eq!(res.status(), StatusCode::$client_status); | ||||||
|             $( |             $( | ||||||
|                 assert_eq!(res.headers().get(), Some(&$response_headers), "headers are invalid"); |                 assert_eq!(res.headers().get(), Some(&$response_headers)); | ||||||
|             )* |             )* | ||||||
|         } |         } | ||||||
|     ); |     ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user