mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-06 00:00:17 +02:00
Always store state in an Arc (#1270)
* Add extension and state benchmarks * wip * Arc the state everywhere * don't require `S: Clone` * fix example
This commit is contained in:
@@ -7,7 +7,7 @@ use std::convert::Infallible;
|
||||
impl<S, B> FromRequest<S, B> for ()
|
||||
where
|
||||
B: Send,
|
||||
S: Send,
|
||||
S: Send + Sync,
|
||||
{
|
||||
type Rejection = Infallible;
|
||||
|
||||
@@ -26,7 +26,7 @@ macro_rules! impl_from_request {
|
||||
where
|
||||
$( $ty: FromRequest<S, B> + Send, )*
|
||||
B: Send,
|
||||
S: Send,
|
||||
S: Send + Sync,
|
||||
{
|
||||
type Rejection = Response;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user