From f26ff5bf379efa95386b4be658be6cefa9831e48 Mon Sep 17 00:00:00 2001 From: Maxwell Borden Date: Fri, 3 May 2024 15:11:34 +0200 Subject: [PATCH] Remove incorrect comment in example 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. --- examples/service_struct_impl.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/service_struct_impl.rs b/examples/service_struct_impl.rs index 25f33fe16d..d0be1eb708 100644 --- a/examples/service_struct_impl.rs +++ b/examples/service_struct_impl.rs @@ -65,8 +65,7 @@ impl Service> 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 })