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));