docs(README): Fix the example in the README.

This commit is contained in:
Jonathan Reem
2015-02-24 14:26:32 -08:00
committed by Sean McArthur
parent 3606f4aed8
commit 9998417fe8

View File

@@ -35,9 +35,8 @@ use hyper::net::Fresh;
use hyper::IpAddr::Ipv4Addr; use hyper::IpAddr::Ipv4Addr;
fn hello(_: Request, mut res: Response<Fresh>) { fn hello(_: Request, mut res: Response<Fresh>) {
*res.status_mut() = StatusCode::Ok;
let mut res = res.start().unwrap(); let mut res = res.start().unwrap();
res.write(b"Hello World!"); res.write_all(b"Hello World!").unwrap();
res.end().unwrap(); res.end().unwrap();
} }