Skip to content

Commit dee02d5

Browse files
Boshenclaude
andcommitted
fix(lint): use map_or in fspy_shared_unix for clippy compliance
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 892b8a0 commit dee02d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/fspy_shared_unix/src

crates/fspy_shared_unix/src/elf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn get_interp(executable: &[u8]) -> nix::Result<Option<&BStr>> {
3838
return Err(nix::Error::ENOEXEC);
3939
};
4040

41-
let interp = CStr::from_bytes_until_nul(interp).map(CStr::to_bytes).unwrap_or(interp);
41+
let interp = CStr::from_bytes_until_nul(interp).map_or(interp, CStr::to_bytes);
4242
Ok(Some(BStr::new(interp)))
4343
}
4444

0 commit comments

Comments
 (0)