Skip to content

Commit

Permalink
Removed clippy warnings for windows targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ph0llux committed Dec 7, 2023
1 parent 645ae5d commit 3ac62a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,16 @@ fn add_to_hardlink_map(hardlink_map: &mut HashMap<u64, HashMap<u64, u64>>, metad
let volume_serial_number = metadata.volume_serial_number().unwrap() as u64;
match hardlink_map.get_mut(&volume_serial_number) {
Some(inner_map) => match inner_map.get_mut(&file_index) {
Some(fno) => return Some(*fno),
Some(fno) => Some(*fno),
None => {
inner_map.insert(file_index, filenumber);
return None
None
},
},
None => {
hardlink_map.insert(volume_serial_number, HashMap::new());
hardlink_map.get_mut(&volume_serial_number).unwrap().insert(file_index, filenumber);
return None;
None
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/object/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ impl LogicalObjectEncoder {
None => return Err(ZffError::new(ZffErrorKind::NoFilesLeft, "There is no input file"))
};
//open first file path - if the path is not accessable, create an empty reader.
#[cfg_attr(target_os = "windows", allow(clippy::needless_borrows_for_generic_args))]
let reader = match File::open(&path) {
Ok(reader) => Box::new(reader),
Err(_) => create_empty_reader()
Expand Down Expand Up @@ -594,6 +595,7 @@ impl LogicalObjectEncoder {
}
};

#[cfg_attr(target_os = "windows", allow(clippy::needless_borrows_for_generic_args))]
let reader = match File::open(&path) {
Ok(reader) => Box::new(reader),
Err(_) => create_empty_reader()
Expand Down

0 comments on commit 3ac62a2

Please sign in to comment.