(Minor clippy fixes)

This commit is contained in:
Ivan Smirnov 2022-01-04 03:13:53 +03:00
parent 6884969222
commit 72c9128c61
3 changed files with 3 additions and 2 deletions

View file

@ -53,7 +53,8 @@
clippy::missing_errors_doc, clippy::missing_errors_doc,
clippy::must_use_candidate, clippy::must_use_candidate,
clippy::module_name_repetitions, 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_attr(not(any(feature = "std", test)), no_std)]
#[cfg(all(feature = "alloc", not(any(feature = "std", test))))] #[cfg(all(feature = "alloc", not(any(feature = "std", test))))]

View file

@ -108,6 +108,7 @@ impl<const N: usize> Pixel<N> {
} }
#[inline] #[inline]
#[allow(clippy::cast_lossless, clippy::cast_possible_truncation)]
pub fn hash_index(self) -> u8 pub fn hash_index(self) -> u8
where where
[u8; N]: Pod, [u8; N]: Pod,

View file

@ -16,7 +16,6 @@ pub enum ColorSpace {
Linear = 1, Linear = 1,
} }
#[allow(clippy::doc_markdown)]
impl ColorSpace { impl ColorSpace {
/// Returns true if the color space is sRGB with linear alpha. /// Returns true if the color space is sRGB with linear alpha.
pub const fn is_srgb(self) -> bool { pub const fn is_srgb(self) -> bool {