Revert change to notebook cell iteration

This commit is contained in:
Zanie 2023-10-02 20:19:41 -05:00
parent 7c05fb5d66
commit 87def58605
1 changed files with 3 additions and 4 deletions

View File

@ -286,10 +286,9 @@ pub(crate) fn lint_path(
// mutated it. // mutated it.
let src_notebook = source_kind.as_ipy_notebook().unwrap(); let src_notebook = source_kind.as_ipy_notebook().unwrap();
let mut stdout = io::stdout().lock(); let mut stdout = io::stdout().lock();
for ((idx, src_cell), dest_cell) in src_notebook // Cell indices are 1-based.
.cells() for ((idx, src_cell), dest_cell) in (1u32..)
.iter() .zip(src_notebook.cells().iter())
.enumerate()
.zip(dest_notebook.cells().iter()) .zip(dest_notebook.cells().iter())
{ {
let (Cell::Code(src_code_cell), Cell::Code(dest_code_cell)) = let (Cell::Code(src_code_cell), Cell::Code(dest_code_cell)) =