From 86b72758ffdaad01d8d816c51672ee27785e9507 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Thu, 31 Jul 2025 20:39:04 +0530 Subject: [PATCH] fix clippy --- core/vector/vector_types.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/vector/vector_types.rs b/core/vector/vector_types.rs index c0c4cd4a2..779f1db86 100644 --- a/core/vector/vector_types.rs +++ b/core/vector/vector_types.rs @@ -47,8 +47,7 @@ impl Vector { assert_eq!( ptr.align_offset(align), 0, - "data pointer must be aligned to {} bytes for f32 access", - align + "data pointer must be aligned to {align} bytes for f32 access" ); unsafe { std::slice::from_raw_parts(ptr as *const f32, self.dims) } @@ -76,8 +75,7 @@ impl Vector { assert_eq!( ptr.align_offset(align), 0, - "data pointer must be aligned to {} bytes for f64 access", - align + "data pointer must be aligned to {align} bytes for f64 access" ); unsafe { std::slice::from_raw_parts(self.data.as_ptr() as *const f64, self.dims) } @@ -751,7 +749,7 @@ mod tests { let v2 = float32_vec_from(&[]); let result = vector_concat(&v1, &v2).unwrap(); assert_eq!(result.dims, 0); - assert_eq!(f32_slice_from_vector(&result), vec![]); + assert_eq!(f32_slice_from_vector(&result), Vec::::new()); } #[test]