mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +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:
@@ -132,6 +132,13 @@ pub struct ExtractorMiddleware<S, E> {
|
||||
_extractor: PhantomData<fn() -> E>,
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn traits() {
|
||||
use crate::tests::*;
|
||||
assert_send::<ExtractorMiddleware<(), NotSendSync>>();
|
||||
assert_sync::<ExtractorMiddleware<(), NotSendSync>>();
|
||||
}
|
||||
|
||||
impl<S, E> Clone for ExtractorMiddleware<S, E>
|
||||
where
|
||||
S: Clone,
|
||||
|
||||
Reference in New Issue
Block a user