Skip to content

Commit c62ea80

Browse files
authored
docs(example): remove incorrect comment in example (hyperium#3656)
There was a comment in the service_struct_impl.rs example indicating that the default match arm would somehow return a 404 and not increment the counter. This wasn't the case. That arm also had a redundant return.
1 parent 39b88d5 commit c62ea80

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/service_struct_impl.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ impl Service<Request<IncomingBody>> for Svc {
6565
"authors extraordinare! counter = {:?}",
6666
self.counter
6767
)),
68-
// Return the 404 Not Found for other routes, and don't increment counter.
69-
_ => return Box::pin(async { mk_response("oh no! not found".into()) }),
68+
_ => mk_response("oh no! not found".into()),
7069
};
7170

7271
Box::pin(async { res })

0 commit comments

Comments
 (0)