mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-19 00:00:14 +02:00
Add Send + Sync check to all services (#277)
Should prevent us accidentally introducing breaking changes. Fixes https://github.com/tokio-rs/axum/issues/275
This commit is contained in:
@@ -441,6 +441,13 @@ pub struct OnMethod<H, B, T, F> {
|
||||
pub(crate) _marker: PhantomData<fn() -> (B, T)>,
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn traits() {
|
||||
use crate::tests::*;
|
||||
assert_send::<OnMethod<(), NotSendSync, NotSendSync, ()>>();
|
||||
assert_sync::<OnMethod<(), NotSendSync, NotSendSync, ()>>();
|
||||
}
|
||||
|
||||
impl<H, B, T, F> fmt::Debug for OnMethod<H, B, T, F>
|
||||
where
|
||||
T: fmt::Debug,
|
||||
|
||||
Reference in New Issue
Block a user