Skip to content

Commit

Permalink
Apply clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Sep 23, 2019
1 parent 59c27ba commit d48aeda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/internal/filter/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
7 changes: 1 addition & 6 deletions src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d48aeda

Please sign in to comment.