chore(header): fix unused_unsafe in internals

This commit is contained in:
Sean McArthur
2018-01-29 10:40:21 -08:00
parent 1f8b3541e2
commit a3f87c0b3f

View File

@@ -93,6 +93,10 @@ impl<V: ?Sized + Any + 'static> PtrMapCell<V> {
#[inline]
pub fn into_value(self, key: TypeId) -> Option<Box<V>> {
// UnsafeCell::into_inner was unsafe forever, and 1.25 has removed
// the unsafe modifier, resulting in a warning. This allow can be
// removed when the minimum supported rust version is at least 1.25.
#[allow(unused_unsafe)]
let map = unsafe { self.0.into_inner() };
match map {
PtrMap::Empty => None,