mirror of
https://github.com/sharkdp/fd
synced 2024-10-06 15:59:27 +00:00
Apply clippy suggestions
This commit is contained in:
parent
59c27baf0f
commit
d48aeda6b2
|
@ -37,13 +37,13 @@ impl SizeFilter {
|
||||||
|
|
||||||
let multiplier = match &captures.get(3).map_or("b", |m| m.as_str()).to_lowercase()[..] {
|
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("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("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("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("ti") => TEBI,
|
||||||
v if v.starts_with("t") => TERA,
|
v if v.starts_with('t') => TERA,
|
||||||
"b" => 1,
|
"b" => 1,
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
|
|
|
@ -328,14 +328,9 @@ fn spawn_senders(
|
||||||
.map(|m| fshelper::is_executable(&m))
|
.map(|m| fshelper::is_executable(&m))
|
||||||
.unwrap_or(false))
|
.unwrap_or(false))
|
||||||
|| (file_types.empty_only && !fshelper::is_empty(&entry))
|
|| (file_types.empty_only && !fshelper::is_empty(&entry))
|
||||||
|
|| !(entry_type.is_file() || entry_type.is_dir() || entry_type.is_symlink())
|
||||||
{
|
{
|
||||||
return ignore::WalkState::Continue;
|
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 {
|
} else {
|
||||||
return ignore::WalkState::Continue;
|
return ignore::WalkState::Continue;
|
||||||
|
|
Loading…
Reference in a new issue