We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b32ca57 commit ccd5535Copy full SHA for ccd5535
clippy_lints/src/format_args.rs
@@ -348,11 +348,11 @@ impl<'tcx> FormatArgsExpr<'_, 'tcx> {
348
&& let Some((last_char_index, ')' | ']' | '}')) = chars.next()
349
{
350
let mut has_comma = false;
351
- while let Some((index, c)) = chars.next() {
+ for (index, c) in chars {
352
if c == ',' {
353
has_comma = true;
354
} else if c.is_whitespace() {
355
- continue;
+ // keep iterating
356
} else if has_comma {
357
return Ok(span
358
.with_lo(span.lo() + BytePos::from_usize(index + c.len_utf8()))
0 commit comments