From 777788f96ff42f850b48f2136c29ade756e142e5 Mon Sep 17 00:00:00 2001 From: Neil Kakkar Date: Fri, 3 May 2024 17:02:37 +0100 Subject: [PATCH] fix lint --- feature-flags/src/router.rs | 6 ++---- feature-flags/tests/common.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/feature-flags/src/router.rs b/feature-flags/src/router.rs index 58dc8cb..1f5941e 100644 --- a/feature-flags/src/router.rs +++ b/feature-flags/src/router.rs @@ -21,9 +21,7 @@ pub fn router(redis: Arc) -> Router { // .allow_credentials(true) // .allow_origin(AllowOrigin::mirror_request()); - let router = Router::new() + Router::new() .route("/flags", post(v0_endpoint::flags).get(v0_endpoint::flags)) - .with_state(state); - - router + .with_state(state) } diff --git a/feature-flags/tests/common.rs b/feature-flags/tests/common.rs index f66a11f..b9afb87 100644 --- a/feature-flags/tests/common.rs +++ b/feature-flags/tests/common.rs @@ -28,7 +28,7 @@ pub struct ServerHandle { impl ServerHandle { pub async fn for_config(config: Config) -> ServerHandle { - let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let listener = TcpListener::bind("127.0.0.1:3001").await.unwrap(); let addr = listener.local_addr().unwrap(); let notify = Arc::new(Notify::new()); let shutdown = notify.clone();