From 9bdd50b97866cc0d7380a11132df38a0355c6079 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Wed, 7 Oct 2020 23:34:07 +0200 Subject: [PATCH] Fix unstable tests --- tests/nested.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/nested.rs b/tests/nested.rs index 80997ee88..50b8b5389 100644 --- a/tests/nested.rs +++ b/tests/nested.rs @@ -51,10 +51,11 @@ async fn nested_middleware() -> tide::Result<()> { async fn nested_with_different_state() -> tide::Result<()> { let mut outer = tide::new(); let mut inner = tide::with_state(42); - inner.at("/").get(|req: tide::Request| async move { - let num = state; - Ok(format!("the number is {}", num)) - }); + inner + .at("/") + .get( + |_req: tide::Request, state: i32| async move { Ok(format!("the number is {}", state)) }, + ); outer.at("/").get(|_, _| async { Ok("Hello, world!") }); outer.at("/foo").nest(inner);