From: Joshua Simmons Date: Thu, 3 Nov 2022 21:51:42 +0000 (+0100) Subject: Fix clippy lints X-Git-Url: https://git.nega.tv//gitweb.cgi?a=commitdiff_plain;h=99f32821ba85775fa85b7e44abf201f5edaf5825;p=josh%2Fnarcissus Fix clippy lints --- diff --git a/narcissus-core/src/arena.rs b/narcissus-core/src/arena.rs index d25826e..18e882e 100644 --- a/narcissus-core/src/arena.rs +++ b/narcissus-core/src/arena.rs @@ -266,6 +266,7 @@ impl Arena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn alloc(&self, value: T) -> &mut T { // Safety: We allocate memory for `T` and then write a `T` into that location. unsafe { @@ -278,6 +279,7 @@ impl Arena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn alloc_with(&self, f: F) -> &mut T where F: FnOnce() -> T, @@ -293,6 +295,7 @@ impl Arena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn try_alloc_with(&self, f: F) -> Result<&mut T, AllocError> where F: FnOnce() -> T, @@ -492,6 +495,7 @@ impl HybridArena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn alloc(&self, value: T) -> &mut T { // Safety: We allocate memory for `T` and then write a `T` into that location. unsafe { @@ -504,6 +508,7 @@ impl HybridArena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn alloc_with(&self, f: F) -> &mut T where F: FnOnce() -> T, @@ -519,6 +524,7 @@ impl HybridArena { } #[inline(always)] + #[allow(clippy::mut_from_ref)] pub fn try_alloc_with(&self, f: F) -> Result<&mut T, AllocError> where F: FnOnce() -> T,