From 20c91ee86800b0d2dcf684189588da2a8b44463f Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 24 Apr 2026 16:43:34 -0500 Subject: [PATCH] [chore]: Fixup clippy lints --- Cargo.toml | 1 + src/ui/library.rs | 2 -- src/ui/song_editor.rs | 2 -- src/ui/text_svg.rs | 1 - src/ui/widgets/verse_editor.rs | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7268e36..b799a5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,7 @@ mismatched_lifetime_syntaxes = "allow" unsafe_code = "deny" [lints.clippy] +cast_possible_truncation = { level = "allow", priority = 1 } pedantic = "warn" nursery = "warn" unwrap_used = "warn" diff --git a/src/ui/library.rs b/src/ui/library.rs index 6527ed5..6bf2281 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -148,7 +148,6 @@ impl<'a> Library { } #[allow(clippy::cast_possible_wrap)] - #[allow(clippy::cast_possible_truncation)] #[allow(clippy::too_many_lines)] #[allow(clippy::match_same_arms)] pub fn update(&mut self, message: Message) -> Action { @@ -1379,7 +1378,6 @@ pub async fn add_db() -> Result { #[allow(clippy::cast_sign_loss)] #[allow(clippy::cast_precision_loss)] -#[allow(clippy::cast_possible_truncation)] pub fn elide_text(text: impl AsRef, width: f32) -> String { const CHAR_SIZE: f32 = 8.0; let text: String = text.as_ref().to_owned(); diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index 4d92450..5397250 100755 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -208,7 +208,6 @@ impl Display for Face { } } -#[allow(clippy::cast_possible_truncation)] impl SongEditor { pub fn new( font_db: Arc, @@ -2214,7 +2213,6 @@ impl SongEditor { #[allow(clippy::unreadable_literal)] #[allow(clippy::items_after_statements)] -#[allow(clippy::cast_possible_truncation)] fn verse_chip( verse: VerseName, index: Option, diff --git a/src/ui/text_svg.rs b/src/ui/text_svg.rs index 9bc6e46..9dfdedc 100644 --- a/src/ui/text_svg.rs +++ b/src/ui/text_svg.rs @@ -295,7 +295,6 @@ impl TextSvg { } #[must_use] - #[allow(clippy::cast_possible_truncation)] #[allow(clippy::cast_precision_loss)] #[allow(clippy::too_many_lines)] pub fn build( diff --git a/src/ui/widgets/verse_editor.rs b/src/ui/widgets/verse_editor.rs index 6bdf7b0..e0cd121 100644 --- a/src/ui/widgets/verse_editor.rs +++ b/src/ui/widgets/verse_editor.rs @@ -35,7 +35,6 @@ pub enum Action { None, } -#[allow(clippy::cast_possible_truncation)] #[allow(clippy::cast_precision_loss)] impl VerseEditor { #[must_use]