mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-01 00:00:14 +02:00
Remove unneeded bounds on S in FromRequest(Parts) implementations
This doesn't actually allow using non-Send or non-Sync state types, but it makes the docs simpler.
This commit is contained in:
@@ -141,15 +141,12 @@ mod tests {
|
||||
struct Extractor(Instant);
|
||||
|
||||
#[async_trait]
|
||||
impl<S> FromRequestParts<S> for Extractor
|
||||
where
|
||||
S: Send + Sync,
|
||||
{
|
||||
impl<S> FromRequestParts<S> for Extractor {
|
||||
type Rejection = Infallible;
|
||||
|
||||
async fn from_request_parts(
|
||||
_parts: &mut Parts,
|
||||
_state: &S,
|
||||
_: &S,
|
||||
) -> Result<Self, Self::Rejection> {
|
||||
COUNTER.fetch_add(1, Ordering::SeqCst);
|
||||
Ok(Self(Instant::now()))
|
||||
|
||||
Reference in New Issue
Block a user