fix: mutable is also borrowed as immutable
This commit is contained in:
parent
30e3bf6dbe
commit
93fc1bf829
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue