From 056d1cf622d6bb20abd1376d48307d0506f94f39 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 10 Oct 2026 20:35:17 -0700 Subject: [PATCH] chore: resolve remaining desktop Clippy warnings Keep the shared rename state concrete with a field-local complexity allowance; remove a needless fixture borrow and collapse the unread transition condition. Assisted-by: gpt-6.1-sol --- crates/snowbound/src/library.rs | 3 ++- crates/snowbound/src/unread.rs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/snowbound/src/library.rs b/crates/snowbound/src/library.rs index 8aa576c127c21a408509271561e0e1db40021ae9..4875a14ed56861b3a60df3da8927d27c3722fe18 100644 --- a/crates/snowbound/src/library.rs +++ b/crates/snowbound/src/library.rs @@ -326,6 +326,7 @@ pub struct Library { /// Sections opened ahead of being shown, or left open after, most recent first, which /// `open` hands out before opening any. kept: Mutex>, + #[allow(clippy::type_complexity)] pub(crate) renames: Arc)>>>, pub(crate) structure: Arc>, themes: Mutex, @@ -1745,7 +1746,7 @@ mod tests { let file = root.join("Stalled.one"); notebook::fs::write( &file, - &onestore::create_section("Stalled.one", "", "Author").unwrap(), + onestore::create_section("Stalled.one", "", "Author").unwrap(), ) .unwrap(); let (entered, waiting) = mpsc::channel(); diff --git a/crates/snowbound/src/unread.rs b/crates/snowbound/src/unread.rs index 2ef77773069d0979c73a5baed1ce2df7d4ddc585..f585124cce3cd949345a14df71b308827b5c8f4a 100644 --- a/crates/snowbound/src/unread.rs +++ b/crates/snowbound/src/unread.rs @@ -283,10 +283,10 @@ impl State { if self.reads.viewing.as_ref().is_some_and(same) { return; } - if let Some((notebook, section, space, kept)) = self.reads.viewing.take() { - if !kept { - self.reads.mark_read(¬ebook, section, Some(space)); - } + if let Some((notebook, section, space, kept)) = self.reads.viewing.take() + && !kept + { + self.reads.mark_read(¬ebook, section, Some(space)); } self.reads.viewing = viewing.map(|(notebook, section, space)| (notebook, section, space, false)); -- 2.54.0