Apply clippy suggestions

This commit is contained in:
sharkdp 2019-09-23 20:23:11 +02:00
parent 59c27baf0f
commit d48aeda6b2
2 changed files with 5 additions and 10 deletions

View File

@ -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,
};

View File

@ -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;