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 {