diff --git a/src/cache.rs b/src/cache.rs index 8fccb628..f5e604cf 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -314,9 +314,8 @@ impl Cache { // specific and common page directories, but not others. let should_walk = |entry: &DirEntry| -> bool { let file_type = entry.file_type(); - let file_name = match entry.file_name().to_str() { - Some(name) => name, - None => return false, + let Some(file_name) = entry.file_name().to_str() else { + return false; }; if file_type.is_dir() { return file_name == "common" || platform_dirs.contains(&file_name); diff --git a/src/types.rs b/src/types.rs index 06a8e644..8a111a65 100644 --- a/src/types.rs +++ b/src/types.rs @@ -82,17 +82,17 @@ impl PlatformType { Self::Android } - #[cfg(any(target_os = "freebsd"))] + #[cfg(target_os = "freebsd")] pub fn current() -> Self { Self::FreeBsd } - #[cfg(any(target_os = "netbsd"))] + #[cfg(target_os = "netbsd")] pub fn current() -> Self { Self::NetBsd } - #[cfg(any(target_os = "openbsd"))] + #[cfg(target_os = "openbsd")] pub fn current() -> Self { Self::OpenBsd }