(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

@@ -748,7 +748,7 @@ mod tests {
let mut w = super::HttpWriter::ChunkedWriter(MemWriter::new());
w.write(b"foo bar").unwrap();
w.write(b"baz quux herp").unwrap();
let buf = w.end().unwrap().unwrap();
let buf = w.end().unwrap().into_inner();
let s = from_utf8(buf.as_slice()).unwrap();
assert_eq!(s, "7\r\nfoo bar\r\nD\r\nbaz quux herp\r\n0\r\n\r\n");
}
@@ -760,7 +760,7 @@ mod tests {
w.write(b"foo bar").unwrap();
assert_eq!(w.write(b"baz"), Err(io::standard_error(io::ShortWrite(1))));
let buf = w.end().unwrap().unwrap();
let buf = w.end().unwrap().into_inner();
let s = from_utf8(buf.as_slice()).unwrap();
assert_eq!(s, "foo barb");
}