Skip to content

Commit

Permalink
Apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Jun 10, 2024
1 parent 83e8428 commit 6b1e1fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6b1e1fe

Please sign in to comment.