Use namespaced enum variants for the map-entry slots.

This commit is contained in:
Robert Straw 2014-12-22 09:33:25 -06:00
parent 326bc69fc2
commit de09145309

View file

@ -188,8 +188,8 @@ impl AnyMap {
/// 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) => Occupied(OccupiedEntry { entry: e }),
hash_map::Entry::Vacant(e) => Vacant(VacantEntry { entry: e }),
}
}