perf, pedantic, nursery, and unwrap_used clippy fixes

This commit is contained in:
Chris Cochrun 2025-09-15 11:19:27 -05:00
parent a186d3bec4
commit 3fe77c93e2
15 changed files with 195 additions and 207 deletions

View file

@ -10,7 +10,7 @@ pub struct Model<T> {
pub kind: LibraryKind,
}
#[derive(Debug, Clone, PartialEq, Copy)]
#[derive(Debug, Clone, PartialEq, Eq, Copy)]
pub enum LibraryKind {
Song,
Video,
@ -46,7 +46,7 @@ impl<T> Model<T> {
Ok(())
}
pub fn get_item(&self, index: i32) -> Option<&T> {
#[must_use] pub fn get_item(&self, index: i32) -> Option<&T> {
self.items.get(index as usize)
}