Skip to content
Myr

Apply clippy suggestions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent 59c27ba · Browse files · 2 files+5 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−10 removed

  • other:+5 added−10 removed

2 files+5 added−10 removed

modified:src/internal/filter/size.rs+4 added-4 removed
35 unmodified lines
36 .and_then(|v| v.as_str().parse::<u64>().ok())?;3738 let multiplier = match &captures.get(3).map_or("b", |m| m.as_str()).to_lowercase()[..] {39 v if v.starts_with("ki") => KIBI,40 v if v.starts_with("k") => KILO,40 v if v.starts_with('k') => KILO,41 v if v.starts_with("mi") => MEBI,42 v if v.starts_with("m") => MEGA,42 v if v.starts_with('m') => MEGA,43 v if v.starts_with("gi") => GIBI,44 v if v.starts_with("g") => GIGA,44 v if v.starts_with('g') => GIGA,45 v if v.starts_with("ti") => TEBI,46 v if v.starts_with("t") => TERA,46 v if v.starts_with('t') => TERA,47 "b" => 1,48 _ => return None,49 };50
159 unmodified lines
modified:src/walk.rs+1 added-6 removed
326 unmodified lines
327 .metadata()328 .map(|m| fshelper::is_executable(&m))329 .unwrap_or(false))330 || (file_types.empty_only && !fshelper::is_empty(&entry))331 || !(entry_type.is_file() || entry_type.is_dir() || entry_type.is_symlink())332 {333 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;334 }335 } else {336 return ignore::WalkState::Continue;337 }
47 unmodified lines