Skip to content

Commit 48bc01b

Browse files
committed
Merge branch 'upstream' of https://github.com/klutzy/rust-http
2 parents 76e1c1b + bf9a661 commit 48bc01b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/examples/client/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
println("First 1024 bytes of response:");
2626
let mut buf = [0, ..1024];
2727
match response.read(buf) {
28-
Some(len) => printfln!("%?", str::from_bytes(buf.slice_to(len))),
28+
Some(len) => printfln!("%?", str::from_utf8(buf.slice_to(len))),
2929
None => println("uh oh, got None :-("),
3030
}
3131
// TODO: read it *all*, correctly

src/libhttp/headers/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn from_stream_with_str<T: HeaderConvertible>(s: &str) -> Option<T> {
1313
pub fn to_stream_into_str<T: HeaderConvertible>(v: &T) -> ~str {
1414
let mut writer = MemWriter::new();
1515
v.to_stream(&mut writer);
16-
str::from_bytes(writer.buf)
16+
str::from_utf8(writer.buf)
1717
}
1818

1919
// Verify that a value cannot be successfully interpreted as a header value of the specified type.

0 commit comments

Comments
 (0)