From 20a0d5259844b59211a7e16d26b262c7ed83140e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 29 Dec 2017 19:10:21 +0100 Subject: [PATCH 1/2] style: Remove pointless assertion. It's a reference, it's not going to be null, and if it was, it would've already been UB on the caller. --- components/style/gecko_bindings/sugar/ownership.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/components/style/gecko_bindings/sugar/ownership.rs b/components/style/gecko_bindings/sugar/ownership.rs index b0ac00368ea..8695efaaa40 100644 --- a/components/style/gecko_bindings/sugar/ownership.rs +++ b/components/style/gecko_bindings/sugar/ownership.rs @@ -109,7 +109,6 @@ pub unsafe trait HasArcFFI : HasFFI { /// /// &GeckoType -> &Arc fn as_arc<'a>(ptr: &'a &Self::FFIType) -> &'a RawOffsetArc { - debug_assert!(!(ptr as *const _).is_null()); unsafe { transmute::<&&Self::FFIType, &RawOffsetArc>(ptr) } From 99dfc67d601e8ce3580d5f603c0329d4ce0ccba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 29 Dec 2017 19:16:31 +0100 Subject: [PATCH 2/2] style: Specify the type of a pointer. This avoids nightly warnings. --- components/style/gecko/wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index d399109fee8..0f5c060ee57 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1776,7 +1776,7 @@ impl<'le> Eq for GeckoElement<'le> {} impl<'le> Hash for GeckoElement<'le> { #[inline] fn hash(&self, state: &mut H) { - (self.0 as *const _).hash(state); + (self.0 as *const RawGeckoElement).hash(state); } }