cargo clippy fixes

feat/vaults
Tomáš Mládek 2021-12-04 16:46:13 +01:00
parent 6edf550a95
commit 4403f518c9
2 changed files with 3 additions and 4 deletions

View File

@ -202,9 +202,9 @@ pub fn fetch_or_create_dir<C: Connection<Backend = Sqlite>>(
};
insert_entry(connection, directory_entry)?;
if parent.is_some() {
if let Some(parent) = parent {
let has_entry = Entry {
entity: parent.unwrap(),
entity: parent,
attribute: String::from(HIER_HAS_ATTR),
value: EntryValue::Address(new_directory_address.clone()),
};

View File

@ -216,8 +216,7 @@ fn _process_directory_entry<P: AsRef<Path>>(
let existing_files_read = existing_files.read().unwrap();
let maybe_existing_file = existing_files_read
.iter()
.find(|file| file.path == normalized_path_str)
.clone();
.find(|file| file.path == normalized_path_str);
if let Some(existing_file) = maybe_existing_file {
let existing_file = existing_file.clone();