mirror of https://github.com/fafhrd91/actix-web
ScopeConfig: Remove changes from actix-http
This commit is contained in:
parent
972de9497e
commit
8f5a4e9b39
|
@ -2,8 +2,6 @@ use std::any::{Any, TypeId};
|
|||
use std::fmt;
|
||||
|
||||
use hashbrown::HashMap;
|
||||
use hashbrown::hash_map::{Keys, Values};
|
||||
use hashbrown::hash_map::IntoIter;
|
||||
|
||||
#[derive(Default)]
|
||||
/// A type map of request extensions.
|
||||
|
@ -20,14 +18,6 @@ impl Extensions {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create `Extensions` with the provided content
|
||||
#[inline]
|
||||
pub fn from(e: Extensions) -> Extensions{
|
||||
Extensions {
|
||||
map: HashMap::from(e.map)
|
||||
}
|
||||
}
|
||||
|
||||
/// Insert a type into this `Extensions`.
|
||||
///
|
||||
/// If a extension of this type already existed, it will
|
||||
|
@ -72,18 +62,6 @@ impl Extensions {
|
|||
pub fn clear(&mut self) {
|
||||
self.map.clear();
|
||||
}
|
||||
|
||||
pub fn into_iter(self) -> IntoIter<TypeId, Box<Any>> {
|
||||
self.map.into_iter()
|
||||
}
|
||||
|
||||
pub fn keys(& self) -> Keys<TypeId, Box<Any>> {
|
||||
self.map.keys()
|
||||
}
|
||||
|
||||
pub fn values(& self) -> Values<TypeId, Box<Any>> {
|
||||
self.map.values()
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Extensions {
|
||||
|
|
Loading…
Reference in New Issue