diff --git a/src/lib.rs b/src/lib.rs index 52492014..6ab96494 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,6 +38,7 @@ extern crate want; extern crate test; pub use http::{ + header, HeaderMap, Method, Request, diff --git a/src/proto/h1/date.rs b/src/proto/h1/date.rs index 6a2a6c56..38a18e1e 100644 --- a/src/proto/h1/date.rs +++ b/src/proto/h1/date.rs @@ -37,8 +37,8 @@ impl CachedDate { fn update(&mut self, now: time::Timespec) { self.pos = 0; - write!(self, "{}", time::at_utc(now).rfc822()).unwrap(); - assert!(self.pos == DATE_VALUE_LENGTH); + let _ = write!(self, "{}", time::at_utc(now).rfc822()); + debug_assert!(self.pos == DATE_VALUE_LENGTH); self.next_update = now + Duration::seconds(1); self.next_update.nsec = 0; } @@ -56,4 +56,4 @@ impl fmt::Write for CachedDate { #[test] fn test_date_len() { assert_eq!(DATE_VALUE_LENGTH, "Sun, 06 Nov 1994 08:49:37 GMT".len()); -} \ No newline at end of file +} diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index 7f1274e1..a9d066c4 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -1002,7 +1002,7 @@ mod tests { b.iter(|| { let mut vec = Vec::new(); Server::encode(head.clone(), Some(BodyLength::Known(10)), &mut None, false, &mut vec).unwrap(); - //assert_eq!(vec.len(), len); + assert_eq!(vec.len(), len); ::test::black_box(vec); }) }