world: introduce SectionIterItem struct

This commit is contained in:
Matthias Schiffer 2023-03-04 16:53:53 +01:00
parent ed422be451
commit 47dc3795a3
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 24 additions and 14 deletions

View file

@ -1,3 +1,5 @@
use std::fmt::Debug;
use anyhow::{bail, Context, Result};
use num_integer::div_rem;
@ -26,7 +28,7 @@ fn palette_bits(len: usize, min: u8, max: u8) -> Option<u8> {
}
/// Trait for common functions of [SectionV1_13] and [SectionV0]
pub trait Section {
pub trait Section: Debug {
fn block_at(&self, coords: SectionBlockCoords) -> Result<Option<BlockType>>;
}