1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

uucore: use is_some_and instead of map_or

This commit is contained in:
Daniel Hofstetter 2025-01-10 08:55:45 +01:00
parent 55367205a9
commit 51f4bfa1a9

View file

@ -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.