1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 12:07:46 +00:00

Fix closure syntax

This commit is contained in:
Michael Gehring 2015-02-06 16:41:20 +01:00
parent 932ef2aa3a
commit 7c617f524b
2 changed files with 2 additions and 2 deletions

View file

@ -535,7 +535,7 @@ impl<'a> Iterator for WordSplit<'a> {
let mut word_nchars = 0;
self.position =
match self.string[word_start..]
.find(|&mut: x: char| if !x.is_whitespace() { word_nchars += char_width(x); false } else { true }) {
.find(|x: char| if !x.is_whitespace() { word_nchars += char_width(x); false } else { true }) {
None => self.length,
Some(s) => s + word_start
};

View file

@ -72,7 +72,7 @@ fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box<
"sha512sum" => ("SHA512", Box::new(Sha512::new()) as Box<Digest>),
_ => {
{
let mut set_or_crash = |&mut: n, val| -> () {
let mut set_or_crash = |n, val| -> () {
if alg.is_some() { crash!(1, "You cannot combine multiple hash algorithms!") };
name = n;
alg = Some(val);