Continue updating for latest rust
Fixed tests, however cannot link bench tests for some reason
This commit is contained in:
@@ -12,7 +12,7 @@ use std::path::BytesContainer;
|
||||
|
||||
use hyper::net;
|
||||
|
||||
static README: &'static [u8] = include_bin!("../README.md");
|
||||
static README: &'static [u8] = include_bytes!("../README.md");
|
||||
|
||||
|
||||
struct MockStream {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt;
|
||||
use std::str::{FromStr, from_utf8};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use serialize::base64::{ToBase64, FromBase64, Standard, Config, Newline};
|
||||
@@ -70,7 +70,7 @@ impl Scheme for String {
|
||||
}
|
||||
|
||||
fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
self.fmt(f)
|
||||
write!(f, "{}", self)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,12 +98,12 @@ impl Scheme for Basic {
|
||||
if let Some(ref pass) = self.password {
|
||||
text.push_str(&pass[]);
|
||||
}
|
||||
text.as_bytes().to_base64(Config {
|
||||
write!(f, "{}", text.as_bytes().to_base64(Config {
|
||||
char_set: Standard,
|
||||
newline: Newline::CRLF,
|
||||
pad: true,
|
||||
line_length: None
|
||||
}).fmt(f)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt;
|
||||
|
||||
use header::{Header, HeaderFormat};
|
||||
use header::shared::util::from_one_raw_str;
|
||||
@@ -24,7 +24,7 @@ impl Header for ContentLength {
|
||||
impl HeaderFormat for ContentLength {
|
||||
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
let ContentLength(ref value) = *self;
|
||||
value.fmt(fmt)
|
||||
write!(fmt, "{}", value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use header::{Header, HeaderFormat};
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt;
|
||||
use std::str::from_utf8;
|
||||
|
||||
use cookie::Cookie;
|
||||
@@ -58,7 +58,7 @@ impl HeaderFormat for Cookies {
|
||||
for (i, cookie) in cookies.iter().enumerate() {
|
||||
try!(write!(fmt, "{}", cookie.pair()));
|
||||
if i < last {
|
||||
try!("; ".fmt(fmt));
|
||||
try!(fmt.write_str("; "));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use header::{Header, HeaderFormat};
|
||||
use Port;
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt;
|
||||
use header::shared::util::from_one_raw_str;
|
||||
|
||||
/// The `Host` header.
|
||||
@@ -66,7 +66,7 @@ impl Header for Host {
|
||||
impl HeaderFormat for Host {
|
||||
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self.port {
|
||||
None | Some(80) | Some(443) => self.hostname.fmt(fmt),
|
||||
None | Some(80) | Some(443) => write!(fmt, "{}", self.hostname),
|
||||
Some(port) => write!(fmt, "{}:{}", self.hostname, port)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use header::{Header, HeaderFormat};
|
||||
use std::fmt::{self, Show};
|
||||
use std::fmt;
|
||||
use std::str::from_utf8;
|
||||
|
||||
use cookie::Cookie;
|
||||
@@ -54,7 +54,7 @@ impl HeaderFormat for SetCookie {
|
||||
if i != 0 {
|
||||
try!(f.write_str("\r\nSet-Cookie: "));
|
||||
}
|
||||
try!(cookie.fmt(f));
|
||||
try!(write!(f, "{}", cookie));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user