Fix clippy::or_fun_call

This commit is contained in:
Alan Du 2019-06-03 10:27:51 -04:00
parent 40424d4222
commit b28ca32db2
12 changed files with 29 additions and 26 deletions

View file

@ -255,7 +255,7 @@ where
let first_non_space = str
.bytes()
.position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r')
.unwrap_or(str.len());
.unwrap_or_else(|| str.len());
*chars = str[first_non_space..].chars()
}
}