From 53b587d63833d43c46a228f1f58517d30f149709 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 13 Dec 2024 17:45:22 -0500 Subject: WARP: Misc clippy lint Add safety doc comment to explain why this is allowed --- plugins/warp/src/cache.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/warp/src/cache.rs b/plugins/warp/src/cache.rs index 652ddc39..f39bceb2 100644 --- a/plugins/warp/src/cache.rs +++ b/plugins/warp/src/cache.rs @@ -26,6 +26,8 @@ pub static TYPE_REF_CACHE: OnceLock> = OnceLock::n pub fn register_cache_destructor() { pub static mut CACHE_DESTRUCTOR: CacheDestructor = CacheDestructor; + #[allow(static_mut_refs)] + // SAFETY: This can be done as the backing data is an opaque ZST. unsafe { CACHE_DESTRUCTOR.register() }; } -- cgit v1.3.1