(blocks: &[Block])
| 1860 | } |
| 1861 | |
| 1862 | fn iter_blocks(blocks: &[Block]) -> impl Iterator<Item = (BlockIdx, &Block)> + '_ { |
| 1863 | let mut next = BlockIdx(0); |
| 1864 | core::iter::from_fn(move || { |
| 1865 | if next == BlockIdx::NULL { |
| 1866 | return None; |
| 1867 | } |
| 1868 | let (idx, b) = (next, &blocks[next]); |
| 1869 | next = b.next; |
| 1870 | Some((idx, b)) |
| 1871 | }) |
| 1872 | } |
| 1873 | |
| 1874 | /// Generate Python 3.11+ format linetable from source locations |
| 1875 | fn generate_linetable( |
no test coverage detected