Skip to content

Commit 9998417

Browse files
reemseanmonstar
authored andcommitted
docs(README): Fix the example in the README.
1 parent 3606f4a commit 9998417

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ use hyper::net::Fresh;
3535
use hyper::IpAddr::Ipv4Addr;
3636

3737
fn hello(_: Request, mut res: Response<Fresh>) {
38-
*res.status_mut() = StatusCode::Ok;
3938
let mut res = res.start().unwrap();
40-
res.write(b"Hello World!");
39+
res.write_all(b"Hello World!").unwrap();
4140
res.end().unwrap();
4241
}
4342

0 commit comments

Comments
 (0)