authorclover caruso <git@paperclover.net> 2026-10-10 20:35:17-07:00
committerclover caruso <git@paperclover.net> 2026-10-10 22:56:06-07:00
log056d1cf622d6bb20abd1376d48307d0506f94f39
tree64938dffa3d1c2fc97800f8c29d51b1d30ac961e
parent142c8f9c9d68cacd0497db0f916de8d72514d52c
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU (~clover)

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

2 files changed, 6 insertions(+), 5 deletions(-)

crates/snowbound/src/library.rs+2-1
...@@ -326,6 +326,7 @@ pub struct Library {...@@ -326,6 +326,7 @@ pub struct Library {
326 /// Sections opened ahead of being shown, or left open after, most recent first, which326 /// Sections opened ahead of being shown, or left open after, most recent first, which
327 /// `open` hands out before opening any.327 /// `open` hands out before opening any.
328 kept: Mutex<crate::prefetch::Recent<String, Section>>,328 kept: Mutex<crate::prefetch::Recent<String, Section>>,
329 #[allow(clippy::type_complexity)]
329 pub(crate) renames: Arc<Mutex<BTreeMap<[u8; 16], (String, Arc<()>)>>>,330 pub(crate) renames: Arc<Mutex<BTreeMap<[u8; 16], (String, Arc<()>)>>>,
330 pub(crate) structure: Arc<async_lock::Mutex<()>>,331 pub(crate) structure: Arc<async_lock::Mutex<()>>,
331 themes: Mutex<ThemeCache>,332 themes: Mutex<ThemeCache>,
...@@ -1745,7 +1746,7 @@ mod tests {...@@ -1745,7 +1746,7 @@ mod tests {
1745 let file = root.join("Stalled.one");1746 let file = root.join("Stalled.one");
1746 notebook::fs::write(1747 notebook::fs::write(
1747 &file,1748 &file,
1748 &onestore::create_section("Stalled.one", "", "Author").unwrap(),1749 onestore::create_section("Stalled.one", "", "Author").unwrap(),
1749 )1750 )
1750 .unwrap();1751 .unwrap();
1751 let (entered, waiting) = mpsc::channel();1752 let (entered, waiting) = mpsc::channel();
crates/snowbound/src/unread.rs+4-4
...@@ -283,10 +283,10 @@ impl State {...@@ -283,10 +283,10 @@ impl State {
283 if self.reads.viewing.as_ref().is_some_and(same) {283 if self.reads.viewing.as_ref().is_some_and(same) {
284 return;284 return;
285 }285 }
286 if let Some((notebook, section, space, kept)) = self.reads.viewing.take() {286 if let Some((notebook, section, space, kept)) = self.reads.viewing.take()
287 if !kept {287 && !kept
288 self.reads.mark_read(&notebook, section, Some(space));288 {
289 }289 self.reads.mark_read(&notebook, section, Some(space));
290 }290 }
291 self.reads.viewing =291 self.reads.viewing =
292 viewing.map(|(notebook, section, space)| (notebook, section, space, false));292 viewing.map(|(notebook, section, space)| (notebook, section, space, false));