mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-09 00:00:12 +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:
@@ -91,7 +91,7 @@ pub struct CookieJar {
|
||||
impl<S, B> FromRequest<S, B> for CookieJar
|
||||
where
|
||||
B: Send,
|
||||
S: Send,
|
||||
S: Send + Sync,
|
||||
{
|
||||
type Rejection = Infallible;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ impl<K> fmt::Debug for PrivateCookieJar<K> {
|
||||
impl<S, B, K> FromRequest<S, B> for PrivateCookieJar<K>
|
||||
where
|
||||
B: Send,
|
||||
S: Send,
|
||||
S: Send + Sync,
|
||||
K: FromRef<S> + Into<Key>,
|
||||
{
|
||||
type Rejection = Infallible;
|
||||
|
||||
@@ -108,7 +108,7 @@ impl<K> fmt::Debug for SignedCookieJar<K> {
|
||||
impl<S, B, K> FromRequest<S, B> for SignedCookieJar<K>
|
||||
where
|
||||
B: Send,
|
||||
S: Send,
|
||||
S: Send + Sync,
|
||||
K: FromRef<S> + Into<Key>,
|
||||
{
|
||||
type Rejection = Infallible;
|
||||
|
||||
Reference in New Issue
Block a user