diff --git a/src/lib.rs b/src/lib.rs index 79a4561..1742701 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -221,10 +221,8 @@ impl Map { /// Otherwise, `None` is returned. #[inline] pub fn insert>(&mut self, value: T) -> Option { - unsafe { - self.raw.insert(TypeId::of::(), value.into_box()) - .map(|any| *any.downcast_unchecked::()) - } + self.raw.insert(TypeId::of::(), value.into_box()) + .map(|any| unsafe { *any.downcast_unchecked::() }) } // rustc 1.60.0-nightly has another method try_insert that would be nice to add when stable.