From d25b2cb008e92e24d8c864c26882b93b51787049 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Mon, 12 Jul 2021 15:16:11 -0700 Subject: [PATCH] Improved compilation --- lib/js-api/src/cell.rs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/js-api/src/cell.rs b/lib/js-api/src/cell.rs index 1f5e32cb9..03943ed9f 100644 --- a/lib/js-api/src/cell.rs +++ b/lib/js-api/src/cell.rs @@ -109,31 +109,10 @@ impl<'a, T: Copy> WasmCell<'a, T> { pub fn get(&self) -> T { let vec = self.memory.to_vec(); unsafe { *(vec.as_ptr() as *const T) } - // unimplemented!(); - } - - /// Get an unsafe mutable pointer to the inner item - /// in the Cell. - /// - /// # Safety - /// - /// This method is highly discouraged to use. We have it for - /// compatibility reasons with Emscripten. - /// It is unsafe because changing an item inline will change - /// the underlying memory. - /// - /// It's highly encouraged to use the `set` method instead. - #[deprecated( - since = "2.0.0", - note = "Please use the memory-safe set method instead" - )] - #[doc(hidden)] - pub unsafe fn get_mut(&self) -> &'a mut T { - &mut *self.inner.as_ptr() } } -impl Debug for WasmCell<'_, T> { +impl Debug for WasmCell<'_, T> { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.get().fmt(f)