From 75d9e47f212837e57ab039e9b9c5a27f16e183ac Mon Sep 17 00:00:00 2001 From: Radzivon Bartoshyk Date: Sat, 4 Jan 2025 12:22:41 +0000 Subject: [PATCH] Clippy --- src/alpha_handle_u8.rs | 1 + src/image_store.rs | 6 ++++-- src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/alpha_handle_u8.rs b/src/alpha_handle_u8.rs index 7f7bb97..304a117 100644 --- a/src/alpha_handle_u8.rs +++ b/src/alpha_handle_u8.rs @@ -125,6 +125,7 @@ pub(crate) fn premultiply_alpha_rgba( src_stride: usize, pool: &Option, ) { + #[allow(clippy::type_complexity)] let mut _dispatcher: fn(&mut [u8], usize, &[u8], usize, usize, usize, &Option) = premultiply_alpha_rgba_impl; #[cfg(all(target_arch = "aarch64", target_feature = "neon"))] diff --git a/src/image_store.rs b/src/image_store.rs index e7f599b..740c290 100644 --- a/src/image_store.rs +++ b/src/image_store.rs @@ -104,6 +104,7 @@ pub enum BufferStore<'a, T: Copy + Debug> { } impl BufferStore<'_, T> { + #[allow(clippy::should_implement_trait)] pub fn borrow(&self) -> &[T] { match self { Self::Borrowed(p_ref) => p_ref, @@ -111,6 +112,7 @@ impl BufferStore<'_, T> { } } + #[allow(clippy::should_implement_trait)] pub fn borrow_mut(&mut self) -> &mut [T] { match self { Self::Borrowed(p_ref) => p_ref, @@ -295,7 +297,7 @@ where } } -impl<'a, T, const N: usize> ImageStoreMut<'a, T, N> +impl ImageStoreMut<'_, T, N> where T: FromPrimitive + Clone + Copy + Debug, { @@ -311,7 +313,7 @@ where } } -impl<'a, T, const N: usize> ImageStore<'a, T, N> +impl ImageStore<'_, T, N> where T: FromPrimitive + Clone + Copy + Debug, { diff --git a/src/lib.rs b/src/lib.rs index 2bbe15d..3cbecc6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -106,7 +106,7 @@ pub use colors::*; #[cfg(feature = "colorspaces")] pub use colorutils_rs::TransferFunction; pub use image_size::ImageSize; -pub use image_store::{ImageStore, ImageStoreMut, BufferStore}; +pub use image_store::{BufferStore, ImageStore, ImageStoreMut}; pub use math::*; pub use sampler::*; pub use scaler::Scaler;