clippy: clean up all warnings

Mostly `cargo clippy --fix`: needless borrows, redundant field names,
match -> if let, io::Error::other, Option::filter/map, let chains, c""
literals. By hand: drop unused impl lifetimes, a type alias for the
font preload map, Iterator::find in next_buffer, contains_key, and
allow new_ret_no_self where constructors intentionally return the
boxed/generic wrapper type.

No functional change; tests and release build unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-03 09:20:25 +00:00
co-authored by Claude Fable 5.1
parent 42ffe9c492
commit 1c6a536026
20 changed files with 153 additions and 190 deletions
+4 -1
View File
@@ -70,10 +70,13 @@ impl PartialEq for ComparableF32 {
impl Eq for ComparableF32 {}
/// font name -> (font name, [(size, glyphs to preload)])
type RequiredFonts = HashMap<&'static str, (&'static str, Vec<(f32, &'static str)>)>;
pub struct FontMap {
fonts: HashMap<(&'static str, ComparableF32), draw::Font<'static>>,
font_paths: HashMap<&'static str, String>,
required_fonts: HashMap<&'static str, (&'static str, Vec<(f32, &'static str)>)>,
required_fonts: RequiredFonts,
}
impl FontMap {