rustup: fmt changes
This commit is contained in:
@@ -116,14 +116,14 @@ impl Request<Fresh> {
|
||||
}
|
||||
|
||||
debug!("writing head: {} {} {}", self.method, uri, self.version);
|
||||
try!(write!(self.body, "{} {} {}", self.method, uri, self.version))
|
||||
try!(write!(&mut self.body, "{} {} {}", self.method, uri, self.version))
|
||||
try!(self.body.write(LINE_ENDING));
|
||||
|
||||
|
||||
let stream = match self.method {
|
||||
Get | Head => {
|
||||
debug!("headers [\n{}]", self.headers);
|
||||
try!(write!(self.body, "{}", self.headers));
|
||||
try!(write!(&mut self.body, "{}", self.headers));
|
||||
try!(self.body.write(LINE_ENDING));
|
||||
EmptyWriter(self.body.unwrap())
|
||||
},
|
||||
@@ -157,7 +157,7 @@ impl Request<Fresh> {
|
||||
}
|
||||
|
||||
debug!("headers [\n{}]", self.headers);
|
||||
try!(write!(self.body, "{}", self.headers));
|
||||
try!(write!(&mut self.body, "{}", self.headers));
|
||||
try!(self.body.write(LINE_ENDING));
|
||||
|
||||
if chunked {
|
||||
|
||||
@@ -69,7 +69,7 @@ impl Response<Fresh> {
|
||||
/// Consume this Response<Fresh>, writing the Headers and Status and creating a Response<Streaming>
|
||||
pub fn start(mut self) -> IoResult<Response<Streaming>> {
|
||||
debug!("writing head: {} {}", self.version, self.status);
|
||||
try!(write!(self.body, "{} {}{}{}", self.version, self.status, CR as char, LF as char));
|
||||
try!(write!(&mut self.body, "{} {}{}{}", self.version, self.status, CR as char, LF as char));
|
||||
|
||||
if !self.headers.has::<common::Date>() {
|
||||
self.headers.set(common::Date(now_utc()));
|
||||
@@ -106,7 +106,7 @@ impl Response<Fresh> {
|
||||
|
||||
|
||||
debug!("headers [\n{}]", self.headers);
|
||||
try!(write!(self.body, "{}", self.headers));
|
||||
try!(write!(&mut self.body, "{}", self.headers));
|
||||
|
||||
try!(self.body.write(LINE_ENDING));
|
||||
|
||||
@@ -144,7 +144,7 @@ impl Response<Streaming> {
|
||||
|
||||
impl Writer for Response<Streaming> {
|
||||
fn write(&mut self, msg: &[u8]) -> IoResult<()> {
|
||||
debug!("write {:u} bytes", msg.len());
|
||||
debug!("write {} bytes", msg.len());
|
||||
self.body.write(msg)
|
||||
}
|
||||
|
||||
|
||||
@@ -1569,12 +1569,6 @@ impl StatusCode {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Unsigned for StatusCode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Unsigned::fmt(&(*self as u16), f)
|
||||
}
|
||||
}
|
||||
|
||||
/// Formats the status code, *including* the canonical reason.
|
||||
///
|
||||
/// ```rust
|
||||
|
||||
Reference in New Issue
Block a user