mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 18:00:35 +01:00
Apply clippy suggestions
This commit is contained in:
parent
59c27baf0f
commit
d48aeda6b2
2 changed files with 5 additions and 10 deletions
|
@ -37,13 +37,13 @@ impl SizeFilter {
|
|||
|
||||
let multiplier = match &captures.get(3).map_or("b", |m| m.as_str()).to_lowercase()[..] {
|
||||
v if v.starts_with("ki") => KIBI,
|
||||
v if v.starts_with("k") => KILO,
|
||||
v if v.starts_with('k') => KILO,
|
||||
v if v.starts_with("mi") => MEBI,
|
||||
v if v.starts_with("m") => MEGA,
|
||||
v if v.starts_with('m') => MEGA,
|
||||
v if v.starts_with("gi") => GIBI,
|
||||
v if v.starts_with("g") => GIGA,
|
||||
v if v.starts_with('g') => GIGA,
|
||||
v if v.starts_with("ti") => TEBI,
|
||||
v if v.starts_with("t") => TERA,
|
||||
v if v.starts_with('t') => TERA,
|
||||
"b" => 1,
|
||||
_ => return None,
|
||||
};
|
||||
|
|
|
@ -328,14 +328,9 @@ fn spawn_senders(
|
|||
.map(|m| fshelper::is_executable(&m))
|
||||
.unwrap_or(false))
|
||||
|| (file_types.empty_only && !fshelper::is_empty(&entry))
|
||||
|| !(entry_type.is_file() || entry_type.is_dir() || entry_type.is_symlink())
|
||||
{
|
||||
return ignore::WalkState::Continue;
|
||||
} else if !(entry_type.is_file()
|
||||
|| entry_type.is_dir()
|
||||
|| entry_type.is_symlink())
|
||||
{
|
||||
// This is probably a block device, char device, fifo or socket. Skip it.
|
||||
return ignore::WalkState::Continue;
|
||||
}
|
||||
} else {
|
||||
return ignore::WalkState::Continue;
|
||||
|
|
Loading…
Reference in a new issue