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 {
|
||||
match session.kind {
|
||||
CollectionKind::DirectoryBrowser => {
|
||||
if let Some(ref dir) = session.path {
|
||||
scan_directory_into(session, dir);
|
||||
if let Some(dir) = session.path.clone() {
|
||||
scan_directory_into(session, &dir);
|
||||
}
|
||||
}
|
||||
CollectionKind::DocumentCollection => {
|
||||
|
|
@ -307,7 +307,7 @@ impl DocumentManager {
|
|||
}
|
||||
|
||||
fn paste_document(&mut self) {
|
||||
let Some(ref item) = self.clipboard else {
|
||||
let Some(item) = self.clipboard.clone() else {
|
||||
return;
|
||||
};
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ impl DocumentManager {
|
|||
return;
|
||||
}
|
||||
|
||||
session.items.push(item.clone());
|
||||
session.items.push(item);
|
||||
session.items.len() - 1
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue