From ce5acd1553171a1d1ade0596bbf0c79b7deb4dc6 Mon Sep 17 00:00:00 2001 From: Jonathan Reem Date: Wed, 19 Nov 2014 15:33:31 -0800 Subject: [PATCH] fix(readme): make the server example compile. --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c814c451..970cdb03 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,11 @@ in non-backwards-compatible ways without warning.__ Hello World Server: ```rust -fn hello(mut incoming: Incoming) { - for conn in incoming { - let (_, mut res) = conn.open().unwrap(); - *res.status_mut() = status::Ok; - let mut res = res.start().unwrap(); - res.write(b"Hello World!"); - res.end().unwrap(); - } +fn hello(_: Request, res: Response) { + *res.status_mut() = status::Ok; + let mut res = res.start().unwrap(); + res.write(b"Hello World!"); + res.end().unwrap(); } fn main() {