From 99f32821ba85775fa85b7e44abf201f5edaf5825 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Thu, 3 Nov 2022 22:51:42 +0100 Subject: [PATCH] Fix clippy lints --- narcissus-core/src/arena.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- 2.49.0