Skip to content

Commit

Permalink
Ensure that Router and RouterService are Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Oct 13, 2022
1 parent 18d005d commit 56cbe27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions axum/src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,4 +688,5 @@ impl<S, B> fmt::Debug for Endpoint<S, B> {
fn traits() {
use crate::test_helpers::*;
assert_send::<Router<(), ()>>();
assert_sync::<Router<(), ()>>();
}
7 changes: 7 additions & 0 deletions axum/src/routing/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,10 @@ where
}
}
}

#[test]
#[allow(warnings)]
fn traits() {
use crate::test_helpers::*;
assert_sync::<RouterService<()>>();
}

0 comments on commit 56cbe27

Please sign in to comment.