diff --git a/src/du/du.rs b/src/du/du.rs index 96cab13cc..516ec8e2f 100644 --- a/src/du/du.rs +++ b/src/du/du.rs @@ -268,7 +268,7 @@ ers of 1000).", None => 1024 }; - let convert_size = |&: size: u64| -> String { + let convert_size = |size: u64| -> String { if matches.opt_present("human-readable") || matches.opt_present("si") { if size >= MB { format!("{:.1}M", (size as f64) / (MB as f64)) diff --git a/src/fold/fold.rs b/src/fold/fold.rs index 9e8de9fe6..cb3b47b42 100644 --- a/src/fold/fold.rs +++ b/src/fold/fold.rs @@ -124,7 +124,7 @@ fn fold_file(file: BufferedReader, bytes: bool, spaces: bool, let slice = { let slice = &line[i..i + width]; if spaces && i + width < len { - match slice.rfind(|&: ch: char| ch.is_whitespace()) { + match slice.rfind(|ch: char| ch.is_whitespace()) { Some(m) => &slice[..m + 1], None => slice } diff --git a/src/mv/mv.rs b/src/mv/mv.rs index 890f6b13d..f89f32d49 100644 --- a/src/mv/mv.rs +++ b/src/mv/mv.rs @@ -161,7 +161,7 @@ pub fn uumain(args: Vec) -> i32 { verbose: matches.opt_present("v"), }; - let string_to_path = |&: s: &String| { Path::new(s.as_slice()) }; + let string_to_path = |s: &String| { Path::new(s.as_slice()) }; let paths: Vec = matches.free.iter().map(string_to_path).collect(); if matches.opt_present("version") { diff --git a/src/stdbuf/stdbuf.rs b/src/stdbuf/stdbuf.rs index ec4aa1b70..9920f7f53 100644 --- a/src/stdbuf/stdbuf.rs +++ b/src/stdbuf/stdbuf.rs @@ -90,8 +90,8 @@ fn print_usage(opts: &[OptGroup]) { } fn parse_size(size: &str) -> Option { - let ext = size.trim_left_matches(|&: c: char| c.is_digit(10)); - let num = size.trim_right_matches(|&: c: char| c.is_alphabetic()); + let ext = size.trim_left_matches(|c: char| c.is_digit(10)); + let num = size.trim_right_matches(|c: char| c.is_alphabetic()); let mut recovered = num.to_string(); recovered.push_str(ext); if recovered.as_slice() != size { diff --git a/src/test/test.rs b/src/test/test.rs index b484630bb..5251a997e 100644 --- a/src/test/test.rs +++ b/src/test/test.rs @@ -336,7 +336,7 @@ fn path(path: &[u8], cond: PathCondition) -> bool { Write = 0o2, Execute = 0o1, } - let perm = |&: stat: stat, p: Permission| { + let perm = |stat: stat, p: Permission| { use libc::{getgid, getuid}; let (uid, gid) = unsafe { (getuid(), getgid()) }; if uid == stat.st_uid { diff --git a/src/tr/tr.rs b/src/tr/tr.rs index a35f9c48a..45e85bfd6 100644 --- a/src/tr/tr.rs +++ b/src/tr/tr.rs @@ -96,7 +96,7 @@ fn delete(set: Vec, complement: bool) { bset.insert(c as usize); } - let is_allowed = |&: c : char| { + let is_allowed = |c : char| { if complement { bset.contains(&(c as usize)) } else {