fix new lints; clippy::unnecessary-map-or
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
2a9bb1ce11
commit
58be22e695
9 changed files with 10 additions and 17 deletions
|
@ -58,8 +58,5 @@ pub unsafe fn current_exe() -> Result<std::path::PathBuf> {
|
|||
/// accurate on all platforms; defaults to false.
|
||||
#[must_use]
|
||||
pub fn current_exe_deleted() -> bool {
|
||||
std::env::current_exe().map_or(false, |exe| {
|
||||
exe.to_str()
|
||||
.map_or(false, |exe| exe.ends_with(" (deleted)"))
|
||||
})
|
||||
std::env::current_exe().is_ok_and(|exe| exe.to_str().is_some_and(|exe| exe.ends_with(" (deleted)")))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue