1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01: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"
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"] }

View File

@ -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<T: 'static>(boxed: Box<dyn Any>) -> Option<T> {
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)]
pub trait CloneToAny {
/// Clone `self` into a new `Box<Any>` object.