1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-18 22:26:37 +00:00

remove dead code

This commit is contained in:
Rob Ede 2021-07-14 00:23:22 +01:00
parent 694cfc94c9
commit cf63f5c755
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
2 changed files with 1 additions and 14 deletions

View file

@ -54,7 +54,6 @@ bitflags = "1.2"
bytes = "1" bytes = "1"
bytestring = "1" bytestring = "1"
derive_more = "0.99.5" derive_more = "0.99.5"
dyn-clone = "1"
encoding_rs = "0.8" encoding_rs = "0.8"
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] } futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] }

View file

@ -1,6 +1,6 @@
use std::{ use std::{
any::{Any, TypeId}, any::{Any, TypeId},
fmt, mem, fmt,
}; };
use ahash::AHashMap; use ahash::AHashMap;
@ -124,11 +124,6 @@ impl Extensions {
self.map.extend(other.map); 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. /// Sets (or overrides) items from cloneable extensions map into this map.
pub(crate) fn clone_from(&mut self, other: &CloneableExtensions) { pub(crate) fn clone_from(&mut self, other: &CloneableExtensions) {
for (k, val) in &other.map { for (k, val) in &other.map {
@ -147,13 +142,6 @@ fn downcast_owned<T: 'static>(boxed: Box<dyn Any>) -> Option<T> {
boxed.downcast().ok().map(|boxed| *boxed) boxed.downcast().ok().map(|boxed| *boxed)
} }
// fn downcast_rc<T: 'static>(boxed: Rc<dyn Any>) -> Option<T> {
// boxed
// .downcast()
// .ok()
// .and_then(|boxed| Rc::try_unwrap(boxed).ok())
// }
#[doc(hidden)] #[doc(hidden)]
pub trait CloneToAny { pub trait CloneToAny {
/// Clone `self` into a new `Box<Any>` object. /// Clone `self` into a new `Box<Any>` object.