File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1015,15 +1015,13 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
10151015 let mut formatted_date = String :: new ( ) ;
10161016
10171017 let mut processed_chunk: Vec < csv:: StringRecord > = Vec :: with_capacity ( chunk_size) ;
1018- let mut col_idx: u32 ;
10191018
10201019 let mut cell_formula;
10211020 let mut itoa_buf = itoa:: Buffer :: new ( ) ;
10221021 let mut ryu_buf = ryu:: Buffer :: new ( ) ;
10231022
10241023 for ( row_idx, row) in chunk {
1025- col_idx = 0 ;
1026- for cell in * row {
1024+ for ( col_idx, cell) in row. iter ( ) . enumerate ( ) {
10271025 match * cell {
10281026 Data :: Empty => record. push_field ( "" ) ,
10291027 Data :: String ( ref s) => record. push_field ( s) ,
@@ -1101,7 +1099,7 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
11011099 write ! ( error_buffer, "{e}" ) . unwrap ( ) ;
11021100 } else {
11031101 cell_formula = sheet_formulas
1104- . get_value ( ( * row_idx, col_idx) )
1102+ . get_value ( ( * row_idx, col_idx as u32 ) )
11051103 . unwrap_or ( & formula_get_value_error) ;
11061104 if error_format == ErrorFormat :: Formula {
11071105 write ! ( error_buffer, "#={cell_formula}" ) . unwrap ( ) ;
@@ -1113,7 +1111,6 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
11131111 record. push_field ( error_buffer. as_str ( ) ) ;
11141112 } ,
11151113 }
1116- col_idx += 1 ;
11171114 }
11181115
11191116 if trim {
You can’t perform that action at this time.
0 commit comments