From a3f87c0b3f7de3f1148b8713a7e75de80fb63bef Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 29 Jan 2018 10:40:21 -0800 Subject: [PATCH] chore(header): fix unused_unsafe in internals --- src/header/internals/cell.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/header/internals/cell.rs b/src/header/internals/cell.rs index daf116a0df..c2774d3199 100644 --- a/src/header/internals/cell.rs +++ b/src/header/internals/cell.rs @@ -93,6 +93,10 @@ impl PtrMapCell { #[inline] pub fn into_value(self, key: TypeId) -> Option> { + // 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,