mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-17 13:49:12 +02:00
Apply clippy suggestions
This commit is contained in:
parent
86293c8723
commit
64f3fbbbc6
2 changed files with 5 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue