Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Clap v4, bump MSRV to 1.75 #298

Merged
merged 3 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply clippy suggestions
  • Loading branch information
dbrgn committed Jun 16, 2024
commit 64f3fbbbc688da3ac4700ca80552efa67fc121c8
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