fix: mutable is also borrowed as immutable

This commit is contained in:
wfx 2026-03-10 22:10:54 +01:00
parent 30e3bf6dbe
commit 93fc1bf829

View file

@ -152,8 +152,8 @@ impl DocumentManager {
for session in &mut loaded { for session in &mut loaded {
match session.kind { match session.kind {
CollectionKind::DirectoryBrowser => { CollectionKind::DirectoryBrowser => {
if let Some(ref dir) = session.path { if let Some(dir) = session.path.clone() {
scan_directory_into(session, dir); scan_directory_into(session, &dir);
} }
} }
CollectionKind::DocumentCollection => { CollectionKind::DocumentCollection => {
@ -307,7 +307,7 @@ impl DocumentManager {
} }
fn paste_document(&mut self) { fn paste_document(&mut self) {
let Some(ref item) = self.clipboard else { let Some(item) = self.clipboard.clone() else {
return; return;
}; };
@ -331,7 +331,7 @@ impl DocumentManager {
return; return;
} }
session.items.push(item.clone()); session.items.push(item);
session.items.len() - 1 session.items.len() - 1
}; };