From 929593227c1c8a1bd2948f30d309286d453d2de6 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 7 Aug 2022 19:35:24 +0000 Subject: [PATCH] flatten the app --- web3_proxy/src/frontend/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index dbb00de3..5ee87b95 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -168,10 +168,9 @@ pub async fn run(port: u16, proxy_app: Arc) -> anyhow::Result<()> .route("/health", get(http::health)) .route("/status", get(http::status)) .route("/users", post(users::create_user)) - .layer(Extension(proxy_app)); - - // 404 for any unknown routes - let app = app.fallback(errors::handler_404.into_service()); + .layer(Extension(proxy_app)) + // 404 for any unknown routes + .fallback(errors::handler_404.into_service()); // run our app with hyper // `axum::Server` is a re-export of `hyper::Server`