From 72c9128c61036a5ebf3f00d972d852aca48c2c4e Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Tue, 4 Jan 2022 03:13:53 +0300 Subject: [PATCH] (Minor clippy fixes) --- src/lib.rs | 3 ++- src/pixel.rs | 1 + src/types.rs | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a218af3..2684163 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,8 @@ clippy::missing_errors_doc, clippy::must_use_candidate, clippy::module_name_repetitions, - clippy::cargo_common_metadata + clippy::cargo_common_metadata, + clippy::doc_markdown )] #![cfg_attr(not(any(feature = "std", test)), no_std)] #[cfg(all(feature = "alloc", not(any(feature = "std", test))))] diff --git a/src/pixel.rs b/src/pixel.rs index 784726e..75ec82b 100644 --- a/src/pixel.rs +++ b/src/pixel.rs @@ -108,6 +108,7 @@ impl Pixel { } #[inline] + #[allow(clippy::cast_lossless, clippy::cast_possible_truncation)] pub fn hash_index(self) -> u8 where [u8; N]: Pod, diff --git a/src/types.rs b/src/types.rs index 8213cf4..81229d4 100644 --- a/src/types.rs +++ b/src/types.rs @@ -16,7 +16,6 @@ pub enum ColorSpace { Linear = 1, } -#[allow(clippy::doc_markdown)] impl ColorSpace { /// Returns true if the color space is sRGB with linear alpha. pub const fn is_srgb(self) -> bool {