From ef357f5372de5c9eca366f91c9c41eb8f0ef79c6 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 11 Oct 2016 17:20:45 +0800 Subject: [PATCH] Fix return types of Owned::into_box Gecko sugar types. --- components/style/gecko_bindings/sugar/ownership.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/gecko_bindings/sugar/ownership.rs b/components/style/gecko_bindings/sugar/ownership.rs index b8652b4cecf..bd3148366bb 100644 --- a/components/style/gecko_bindings/sugar/ownership.rs +++ b/components/style/gecko_bindings/sugar/ownership.rs @@ -204,7 +204,7 @@ pub struct Owned { impl Owned { /// Owned -> Box - pub fn into_box(self) -> Box where U: HasBoxFFI { + pub fn into_box(self) -> Box where U: HasBoxFFI { unsafe { transmute(self) } } pub fn maybe(self) -> OwnedOrNull { @@ -238,7 +238,7 @@ impl OwnedOrNull { self.ptr == ptr::null_mut() } /// OwnedOrNull -> Option> - pub fn into_box_opt(self) -> Option> where U: HasBoxFFI { + pub fn into_box_opt(self) -> Option> where U: HasBoxFFI { if self.is_null() { None } else {