Skip to content

Commit c98dfa8

Browse files
authored
Merge pull request #384 from Muscraft/address-clippy-warning
chore: Address clippy::explicit_counter_loop
2 parents 09cc5b5 + 895cc6d commit c98dfa8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/renderer/styled_buffer.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ impl StyledBuffer {
8282
/// If `line` does not exist in our buffer, adds empty lines up to the given
8383
/// and fills the last line with unstyled whitespace.
8484
pub(crate) fn puts(&mut self, line: usize, col: usize, string: &str, style: ElementStyle) {
85-
let mut n = col;
86-
for c in string.chars() {
87-
self.putc(line, n, c, style);
88-
n += 1;
85+
for (offset, c) in string.chars().enumerate() {
86+
self.putc(line, col + offset, c, style);
8987
}
9088
}
9189

0 commit comments

Comments
 (0)