Skip to content

Commit d48aeda

Browse files
committed
Apply clippy suggestions
1 parent 59c27ba commit d48aeda

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/internal/filter/size.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ impl SizeFilter {
3737

3838
let multiplier = match &captures.get(3).map_or("b", |m| m.as_str()).to_lowercase()[..] {
3939
v if v.starts_with("ki") => KIBI,
40-
v if v.starts_with("k") => KILO,
40+
v if v.starts_with('k') => KILO,
4141
v if v.starts_with("mi") => MEBI,
42-
v if v.starts_with("m") => MEGA,
42+
v if v.starts_with('m') => MEGA,
4343
v if v.starts_with("gi") => GIBI,
44-
v if v.starts_with("g") => GIGA,
44+
v if v.starts_with('g') => GIGA,
4545
v if v.starts_with("ti") => TEBI,
46-
v if v.starts_with("t") => TERA,
46+
v if v.starts_with('t') => TERA,
4747
"b" => 1,
4848
_ => return None,
4949
};

src/walk.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,9 @@ fn spawn_senders(
328328
.map(|m| fshelper::is_executable(&m))
329329
.unwrap_or(false))
330330
|| (file_types.empty_only && !fshelper::is_empty(&entry))
331+
|| !(entry_type.is_file() || entry_type.is_dir() || entry_type.is_symlink())
331332
{
332333
return ignore::WalkState::Continue;
333-
} else if !(entry_type.is_file()
334-
|| entry_type.is_dir()
335-
|| entry_type.is_symlink())
336-
{
337-
// This is probably a block device, char device, fifo or socket. Skip it.
338-
return ignore::WalkState::Continue;
339334
}
340335
} else {
341336
return ignore::WalkState::Continue;

0 commit comments

Comments
 (0)