Skip to content

Commit

Permalink
docs(example): remove incorrect comment in example (hyperium#3656)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Tacklebox authored May 3, 2024
1 parent 39b88d5 commit c62ea80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/service_struct_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ impl Service<Request<IncomingBody>> for Svc {
"authors extraordinare! counter = {:?}",
self.counter
)),
// Return the 404 Not Found for other routes, and don't increment counter.
_ => return Box::pin(async { mk_response("oh no! not found".into()) }),
_ => mk_response("oh no! not found".into()),
};

Box::pin(async { res })
Expand Down

0 comments on commit c62ea80

Please sign in to comment.