From a360dbf98ddcd386a03b420bf7e3f435b7f6b5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 25 May 2018 00:51:43 +0200 Subject: [PATCH] style: Remove dead and unsafe code. MozReview-Commit-ID: 9seuLNCJAqz --- .../style/gecko_bindings/sugar/ns_com_ptr.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/components/style/gecko_bindings/sugar/ns_com_ptr.rs b/components/style/gecko_bindings/sugar/ns_com_ptr.rs index f50eda02c3d..488dc862608 100644 --- a/components/style/gecko_bindings/sugar/ns_com_ptr.rs +++ b/components/style/gecko_bindings/sugar/ns_com_ptr.rs @@ -13,13 +13,6 @@ impl nsCOMPtr { pub fn raw(&self) -> *mut T { self.mRawPtr } - - /// Set this pointer from an addrefed raw pointer. - /// It leaks the old pointer. - #[inline] - pub unsafe fn set_raw_from_addrefed(&mut self, ptr: *mut T) { - self.mRawPtr = ptr; - } } #[cfg(not(feature = "gecko_debug"))] @@ -29,11 +22,4 @@ impl nsCOMPtr { pub fn raw(&self) -> *mut T { self._base.mRawPtr as *mut _ } - - /// Set this pointer from an addrefed raw pointer. - /// It leaks the old pointer. - #[inline] - pub unsafe fn set_raw_from_addrefed(&mut self, ptr: *mut T) { - self._base.mRawPtr = ptr as *mut _; - } }