Skip to content

Commit

Permalink
Fix unstable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshuawuyts committed Oct 15, 2021
1 parent ad8b314 commit 9bdd50b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/nested.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32>| 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);

Expand Down

0 comments on commit 9bdd50b

Please sign in to comment.