Auto merge of #80499 - matthiaskrgr:red_clos, r=estebank

remove redundant closures (clippy::redundant_closure)
This commit is contained in:
bors 2021-01-12 11:20:47 +00:00
commit fc9944fe84
10 changed files with 41 additions and 44 deletions

View file

@ -92,7 +92,7 @@ crate fn matches_codepattern(a: &str, b: &str) -> bool {
/// Advances the given peekable `Iterator` until it reaches a non-whitespace character.
fn scan_for_non_ws_or_end<I: Iterator<Item = char>>(iter: &mut Peekable<I>) {
while iter.peek().copied().map(|c| rustc_lexer::is_whitespace(c)) == Some(true) {
while iter.peek().copied().map(rustc_lexer::is_whitespace) == Some(true) {
iter.next();
}
}