(fix) unwrap() => into_inner()

This commit is contained in:
Evgeny Rozaliev
2014-11-27 16:00:24 +03:00
parent ba758ecde1
commit c77cd3d3da
3 changed files with 11 additions and 11 deletions

View File

@@ -80,9 +80,9 @@ impl Response {
&self.status_raw
}
/// Unwraps the Request to return the NetworkStream underneath.
pub fn unwrap(self) -> Box<NetworkStream + Send> {
self.body.unwrap().unwrap()
/// Consumes the Request to return the NetworkStream underneath.
pub fn into_inner(self) -> Box<NetworkStream + Send> {
self.body.unwrap().into_inner()
}
}
@@ -120,7 +120,7 @@ mod tests {
status_raw: RawStatus(200, Slice("OK"))
};
let b = res.unwrap().downcast::<MockStream>().unwrap();
let b = res.into_inner().downcast::<MockStream>().unwrap();
assert_eq!(b, box MockStream::new());
}