From 331f05dd0d1a3579879c5d5c807d18932c4e1da8 Mon Sep 17 00:00:00 2001 From: Michael Hewson Date: Wed, 11 Jun 2025 20:10:44 -0400 Subject: [PATCH] fix unsafe autoref lint error --- src/vec/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vec/mod.rs b/src/vec/mod.rs index bcb61b2..8231dbf 100644 --- a/src/vec/mod.rs +++ b/src/vec/mod.rs @@ -1980,7 +1980,7 @@ impl Vec { #[cfg(not(no_global_oom_handling))] #[inline(always)] unsafe fn append_elements(&mut self, other: *const [T]) { - let count = unsafe { (*other).len() }; + let count = other.len(); self.reserve(count); let len = self.len(); unsafe { ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) };