mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-31 00:00:10 +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:
@@ -596,3 +596,14 @@ where
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn traits() {
|
||||
use crate::tests::*;
|
||||
|
||||
assert_send::<OnMethod<(), (), NotSendSync>>();
|
||||
assert_sync::<OnMethod<(), (), NotSendSync>>();
|
||||
|
||||
assert_send::<HandleError<(), (), NotSendSync>>();
|
||||
assert_sync::<HandleError<(), (), NotSendSync>>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user