fix(readme): make the server example compile.
This commit is contained in:
@@ -25,15 +25,12 @@ 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();
|
||||
fn hello(_: Request, res: Response<Fresh>) {
|
||||
*res.status_mut() = status::Ok;
|
||||
let mut res = res.start().unwrap();
|
||||
res.write(b"Hello World!");
|
||||
res.end().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let server = Server::http(Ipv4Addr(127, 0, 0, 1), 1337);
|
||||
|
||||
Reference in New Issue
Block a user