Skip to content

Commit 895cc6d

Browse files
committed
chore: Address clippy::explicit_counter_loop
1 parent 5db55b0 commit 895cc6d

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)