From db566a634cf7562f1d9ea69965aa8ecb8f92725e Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 6 Mar 2019 10:03:18 -0800 Subject: [PATCH] make State type Send compatible --- src/state.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.