/// Gets the given key's corresponding entry in the map for in-place manipulation
pub fn entry<T: Any + 'static>(&mut self) -> Entry<T> {
match self.data.entry(TypeId::of::<T>()) {
/// Gets the given key's corresponding entry in the map for in-place manipulation
pub fn entry<T: Any + 'static>(&mut self) -> Entry<T> {
match self.data.entry(TypeId::of::<T>()) {
- hash_map::Occupied(e) => Occupied(OccupiedEntry { entry: e }),
- hash_map::Vacant(e) => Vacant(VacantEntry { entry: e }),
+ hash_map::Entry::Occupied(e) => Entry::Occupied(OccupiedEntry { entry: e }),
+ hash_map::Entry::Vacant(e) => Entry::Vacant(VacantEntry { entry: e }),
- Vacant(_) => unreachable!(),
- Occupied(mut view) => {
+ Entry::Vacant(_) => unreachable!(),
+ Entry::Occupied(mut view) => {
assert_eq!(view.get(), &A(10));
assert_eq!(view.set(A(100)), A(10));
}
assert_eq!(view.get(), &A(10));
assert_eq!(view.set(A(100)), A(10));
}
- Vacant(_) => unreachable!(),
- Occupied(mut view) => {
+ Entry::Vacant(_) => unreachable!(),
+ Entry::Occupied(mut view) => {