diff --git a/src/types/json.rs b/src/types/json.rs index 73614d87e..fbc47dd1c 100644 --- a/src/types/json.rs +++ b/src/types/json.rs @@ -1,6 +1,6 @@ //! Json extractor/responder -use std::rc::Rc; +use std::sync::Arc; use std::{fmt, ops}; use bytes::BytesMut; @@ -236,7 +236,7 @@ where #[derive(Clone)] pub struct JsonConfig { limit: usize, - ehandler: Option Error>>, + ehandler: Option Error>>, } impl JsonConfig { @@ -251,7 +251,7 @@ impl JsonConfig { where F: Fn(JsonPayloadError, &HttpRequest) -> Error + 'static, { - self.ehandler = Some(Rc::new(f)); + self.ehandler = Some(Arc::new(f)); self } }