mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
Fix closure syntax
This commit is contained in:
parent
932ef2aa3a
commit
7c617f524b
2 changed files with 2 additions and 2 deletions
|
@ -535,7 +535,7 @@ impl<'a> Iterator for WordSplit<'a> {
|
||||||
let mut word_nchars = 0;
|
let mut word_nchars = 0;
|
||||||
self.position =
|
self.position =
|
||||||
match self.string[word_start..]
|
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,
|
None => self.length,
|
||||||
Some(s) => s + word_start
|
Some(s) => s + word_start
|
||||||
};
|
};
|
||||||
|
|
|
@ -72,7 +72,7 @@ fn detect_algo(program: &str, matches: &getopts::Matches) -> (&'static str, Box<
|
||||||
"sha512sum" => ("SHA512", Box::new(Sha512::new()) as Box<Digest>),
|
"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!") };
|
if alg.is_some() { crash!(1, "You cannot combine multiple hash algorithms!") };
|
||||||
name = n;
|
name = n;
|
||||||
alg = Some(val);
|
alg = Some(val);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue