Skip to content

Commit

Permalink
edit: resolve clippy lint regarding loop counter
Browse files Browse the repository at this point in the history
rzmk committed Aug 22, 2024
1 parent aa2dcd2 commit 609730d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cmd/edit.rs
Original file line number Diff line number Diff line change
@@ -89,14 +89,12 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
let mut current_row: usize = if no_headers { 1 } else { 0 };
while rdr.read_byte_record(&mut record)? {
if row + 1 == current_row {
let mut current_col: usize = 0;
for field in record.iter() {
for (current_col, field) in record.iter().enumerate() {
if column_index == Some(current_col) {
wtr.write_field(&value)?;
} else {
wtr.write_field(field)?;
}
current_col += 1;
}
wtr.write_record(None::<&[u8]>)?;
} else {

0 comments on commit 609730d

Please sign in to comment.