From 9b93cc00ada9da3cde36c11636b560cc3c8de892 Mon Sep 17 00:00:00 2001 From: daddinuz Date: Wed, 8 May 2019 21:33:11 +0200 Subject: [PATCH] replace Rc with Arc --- src/types/json.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } }