mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 21:24:12 +00:00
Use enumerate()
This commit is contained in:
parent
e45c0c4815
commit
3dd31e25bf
@ -405,10 +405,8 @@ fn format_lines(
|
||||
let mut line_buffer = String::with_capacity(config.max_width() * 2);
|
||||
let mut is_string = false; // true if the current line contains a string literal.
|
||||
let mut format_line = config.file_lines().contains_line(name, cur_line);
|
||||
let mut b = 0;
|
||||
|
||||
for (kind, c) in CharClasses::new(text.chars()) {
|
||||
b += 1;
|
||||
for (kind, (b, c)) in CharClasses::new(text.chars().enumerate()) {
|
||||
if c == '\r' {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user