1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-29 19:24:58 +02:00

remove public Clone for Request

This commit is contained in:
Nikolay Kim
2018-07-04 22:57:40 +06:00
parent 5d79114239
commit d5606625a2
2 changed files with 9 additions and 4 deletions

View File

@ -20,7 +20,6 @@ bitflags! {
}
/// Request's context
#[derive(Clone)]
pub struct Request {
pub(crate) inner: Rc<InnerRequest>,
}
@ -196,6 +195,12 @@ impl Request {
&self.inner().settings
}
pub(crate) fn clone(&self) -> Self {
Request {
inner: self.inner.clone(),
}
}
pub(crate) fn release(self) {
let mut inner = self.inner;
if let Some(r) = Rc::get_mut(&mut inner) {