Skip to content

Commit b841ef6

Browse files
author
Fuyang Liu
committed
Minor fixup
1 parent 586b8ed commit b841ef6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/echo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ async fn echo(req: Request<Body>) -> Result<Response<Body>, hyper::Error> {
4646
chunk.iter().rev().cloned().collect::<Vec<u8>>()
4747

4848
})?;
49-
Ok(Response::new(Body::from(reversed_chunk)));
49+
Ok(Response::new(Body::from(reversed_chunk)))
5050
}
5151

5252
// Return the 404 Not Found for other routes.
5353
_ => {
54-
let mut not_found = Response::new(Body::empty());
54+
let mut not_found = Response::default();
5555
*not_found.status_mut() = StatusCode::NOT_FOUND;
5656
Ok(not_found)
5757
}

0 commit comments

Comments
 (0)