Drain tiles in `TileId`-ascending order (BTreeMap guarantees this).
(&mut self)
| 286 | |
| 287 | /// Drain tiles in `TileId`-ascending order (BTreeMap guarantees this). |
| 288 | pub fn drain_sorted(&mut self) -> Vec<(TileId, TileBuffer)> { |
| 289 | std::mem::take(&mut self.tiles).into_iter().collect() |
| 290 | } |
| 291 | |
| 292 | pub fn iter(&self) -> impl Iterator<Item = (&TileId, &TileBuffer)> { |
| 293 | self.tiles.iter() |