fix(readme): make the server example compile.
This commit is contained in:
13
README.md
13
README.md
@@ -25,14 +25,11 @@ in non-backwards-compatible ways without warning.__
|
|||||||
Hello World Server:
|
Hello World Server:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
fn hello(mut incoming: Incoming) {
|
fn hello(_: Request, res: Response<Fresh>) {
|
||||||
for conn in incoming {
|
*res.status_mut() = status::Ok;
|
||||||
let (_, mut res) = conn.open().unwrap();
|
let mut res = res.start().unwrap();
|
||||||
*res.status_mut() = status::Ok;
|
res.write(b"Hello World!");
|
||||||
let mut res = res.start().unwrap();
|
res.end().unwrap();
|
||||||
res.write(b"Hello World!");
|
|
||||||
res.end().unwrap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user