diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index e46d07e73..a12fed4b9 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -54,7 +54,6 @@ bitflags = "1.2" bytes = "1" bytestring = "1" derive_more = "0.99.5" -dyn-clone = "1" encoding_rs = "0.8" futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] } diff --git a/actix-http/src/extensions.rs b/actix-http/src/extensions.rs index a3b9bb5b0..4802bf233 100644 --- a/actix-http/src/extensions.rs +++ b/actix-http/src/extensions.rs @@ -1,6 +1,6 @@ use std::{ any::{Any, TypeId}, - fmt, mem, + fmt, }; use ahash::AHashMap; @@ -124,11 +124,6 @@ impl Extensions { self.map.extend(other.map); } - /// Sets (or overrides) items from `other` into this map. - pub(crate) fn drain_from(&mut self, other: &mut Self) { - self.map.extend(mem::take(&mut other.map)); - } - /// Sets (or overrides) items from cloneable extensions map into this map. pub(crate) fn clone_from(&mut self, other: &CloneableExtensions) { for (k, val) in &other.map { @@ -147,13 +142,6 @@ fn downcast_owned(boxed: Box) -> Option { boxed.downcast().ok().map(|boxed| *boxed) } -// fn downcast_rc(boxed: Rc) -> Option { -// boxed -// .downcast() -// .ok() -// .and_then(|boxed| Rc::try_unwrap(boxed).ok()) -// } - #[doc(hidden)] pub trait CloneToAny { /// Clone `self` into a new `Box` object.