Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions axum/src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ pub struct RouterIntoService<B, S = ()> {
_marker: PhantomData<B>,
}

// SAFETY: B is only held onto as PhantomData so does not affect the Sync-ness of
// RouterIntoService; S passed deep into the type heirarchy but eventually ends up as part of
// Box<dyn ErasedIntoRoute<S, E>> and ErasedIntoRoute<S, E> as Send + Sync supertrait bounds.
unsafe impl<B, S> Sync for RouterIntoService<B, S> {}

impl<B, S> Clone for RouterIntoService<B, S>
where
Router<S>: Clone,
Expand Down
Loading