docs(example): remove incorrect comment in example (#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.
This commit is contained in:
Maxwell Borden
2024-05-03 23:20:44 +02:00
committed by GitHub
parent 39b88d5c99
commit c62ea805b5

View File

@@ -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 })