Skip to content

Commit 7b2de8f

Browse files
committed
thanks clippy
1 parent 8d84818 commit 7b2de8f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gix-validate/src/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ fn check_win_devices_and_illegal_characters(input: &BStr) -> Option<component::E
185185
}
186186

187187
fn is_symlink(mode: Option<component::Mode>) -> bool {
188-
mode.map_or(false, |m| m == component::Mode::Symlink)
188+
mode == Some(component::Mode::Symlink)
189189
}
190190

191191
fn is_dot_hfs(input: &BStr, search_case_insensitive: &str) -> bool {

tests/tools/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,9 @@ fn is_lfs_pointer_file(path: &Path) -> bool {
685685
std::fs::OpenOptions::new()
686686
.read(true)
687687
.open(path)
688-
.and_then(|mut f| f.read_exact(&mut buf))
689-
.map_or(false, |_| buf.starts_with(PREFIX))
688+
.map_or(false, |mut f| {
689+
f.read_exact(&mut buf).is_ok_and(|_| buf.starts_with(PREFIX))
690+
})
690691
}
691692

692693
/// The `script_identity` will be baked into the soon to be created `archive` as it identifies the script

0 commit comments

Comments
 (0)