From ac5f1c2c9f1324e6b328bffb18623e48a2a5c768 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Mon, 23 Dec 2024 15:28:46 +1300 Subject: [PATCH] Temporarily allow missing safety doc lint Signed-off-by: Nico Burns --- malloc_size_of/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/malloc_size_of/src/lib.rs b/malloc_size_of/src/lib.rs index e02aba4..dbf2d56 100644 --- a/malloc_size_of/src/lib.rs +++ b/malloc_size_of/src/lib.rs @@ -152,6 +152,7 @@ impl MallocSizeOfOps { /// Call `size_of_op` on `ptr`, first checking that the allocation isn't /// empty, because some types (such as `Vec`) utilize empty allocations. + #[allow(clippy::missing_safety_doc)] pub unsafe fn malloc_size_of(&self, ptr: *const T) -> usize { if MallocSizeOfOps::is_empty(ptr) { 0 @@ -167,6 +168,7 @@ impl MallocSizeOfOps { /// Call `enclosing_size_of_op`, which must be available, on `ptr`, which /// must not be empty. + #[allow(clippy::missing_safety_doc)] pub unsafe fn malloc_enclosing_size_of(&self, ptr: *const T) -> usize { assert!(!MallocSizeOfOps::is_empty(ptr)); (self.enclosing_size_of_op.unwrap())(ptr as *const c_void)