Skip to content

Commit

Permalink
Merge pull request #24 from awxkee/dev
Browse files Browse the repository at this point in the history
Clippy
  • Loading branch information
awxkee authored Jan 4, 2025
2 parents 901a270 + 75d9e47 commit f3d69b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/alpha_handle_u8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub(crate) fn premultiply_alpha_rgba(
src_stride: usize,
pool: &Option<ThreadPool>,
) {
#[allow(clippy::type_complexity)]
let mut _dispatcher: fn(&mut [u8], usize, &[u8], usize, usize, usize, &Option<ThreadPool>) =
premultiply_alpha_rgba_impl;
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
Expand Down
6 changes: 4 additions & 2 deletions src/image_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ pub enum BufferStore<'a, T: Copy + Debug> {
}

impl<T: Copy + Debug> BufferStore<'_, T> {
#[allow(clippy::should_implement_trait)]
pub fn borrow(&self) -> &[T] {
match self {
Self::Borrowed(p_ref) => p_ref,
Self::Owned(vec) => vec,
}
}

#[allow(clippy::should_implement_trait)]
pub fn borrow_mut(&mut self) -> &mut [T] {
match self {
Self::Borrowed(p_ref) => p_ref,
Expand Down Expand Up @@ -295,7 +297,7 @@ where
}
}

impl<'a, T, const N: usize> ImageStoreMut<'a, T, N>
impl<T, const N: usize> ImageStoreMut<'_, T, N>
where
T: FromPrimitive + Clone + Copy + Debug,
{
Expand All @@ -311,7 +313,7 @@ where
}
}

impl<'a, T, const N: usize> ImageStore<'a, T, N>
impl<T, const N: usize> ImageStore<'_, T, N>
where
T: FromPrimitive + Clone + Copy + Debug,
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f3d69b6

Please sign in to comment.