diff --git a/examples/hello.rs b/examples/hello.rs index 0c36c8d0..6d58c529 100644 --- a/examples/hello.rs +++ b/examples/hello.rs @@ -6,10 +6,10 @@ use std::io::net::ip::Ipv4Addr; static PHRASE: &'static [u8] = b"Hello World!"; fn hyper_handle(mut incoming: hyper::server::Incoming) { - let mut pool = TaskPool::new(100, || { proc(_) { } }); + let mut pool = TaskPool::new(100); for conn in incoming { - pool.execute(proc(_) { + pool.execute(proc() { let (_, res) = conn.open().unwrap(); let mut res = res.start().unwrap(); res.write(PHRASE).unwrap(); @@ -21,4 +21,3 @@ fn hyper_handle(mut incoming: hyper::server::Incoming) { fn main() { hyper::Server::http(Ipv4Addr(127, 0, 0, 1), 3000).listen(hyper_handle).unwrap(); } -