Skip to content

Commit

Permalink
uucore: use is_some_and instead of map_or
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Jan 10, 2025
1 parent 5536720 commit 51f4bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uucore/src/lib/features/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ pub fn path_ends_with_terminator(path: &Path) -> bool {
path.as_os_str()
.encode_wide()
.last()
.map_or(false, |wide| wide == b'/'.into() || wide == b'\\'.into())
.is_some_and(|wide| wide == b'/'.into() || wide == b'\\'.into())
}

/// Checks if the standard input (stdin) is a directory.
Expand Down

0 comments on commit 51f4bfa

Please sign in to comment.