diff --git a/src/state.rs b/src/state.rs index d4e4c894..265c6f01 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,5 +1,5 @@ use std::ops::Deref; -use std::rc::Rc; +use std::sync::Arc; use actix_http::error::{Error, ErrorInternalServerError}; use actix_http::Extensions; @@ -18,11 +18,11 @@ pub(crate) trait StateFactoryResult { } /// Application state -pub struct State(Rc); +pub struct State(Arc); impl State { pub(crate) fn new(state: T) -> State { - State(Rc::new(state)) + State(Arc::new(state)) } /// Get referecnce to inner state type.