From 898687178aea73bcdd71caead714d1116908eac0 Mon Sep 17 00:00:00 2001 From: Lukasz Anforowicz Date: Tue, 4 Feb 2025 00:52:22 +0000 Subject: [PATCH] Fixing 2 minor `cargo clippy` warnings. --- src/filter.rs | 2 +- src/text_metadata.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filter.rs b/src/filter.rs index 38b619b1..c33cc205 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -346,7 +346,7 @@ fn filter_paeth_stbi(a: u8, b: u8, c: u8) -> u8 { let hi = a.max(b); let t0 = if hi as i16 <= thresh { lo } else { c }; let t1 = if thresh <= lo as i16 { hi } else { t0 }; - return t1; + t1 } #[cfg(any(test, all(feature = "unstable", target_arch = "x86_64")))] diff --git a/src/text_metadata.rs b/src/text_metadata.rs index 3bb491fe..a5ace94a 100644 --- a/src/text_metadata.rs +++ b/src/text_metadata.rs @@ -5,9 +5,9 @@ //! chunks. There are three kinds of text chunks. //! - `tEXt`: This has a `keyword` and `text` field, and is ISO 8859-1 encoded. //! - `zTXt`: This is semantically the same as `tEXt`, i.e. it has the same fields and -//! encoding, but the `text` field is compressed before being written into the PNG file. +//! encoding, but the `text` field is compressed before being written into the PNG file. //! - `iTXt`: This chunk allows for its `text` field to be any valid UTF-8, and supports -//! compression of the text field as well. +//! compression of the text field as well. //! //! The `ISO 8859-1` encoding technically doesn't allow any control characters //! to be used, but in practice these values are encountered anyway. This can