adventofcode23/src/util/mod.rs
2023-12-12 18:12:29 +01:00

11 lines
208 B
Rust

pub mod grid;
pub trait RangeLen<T> {
fn len(&self) -> T;
}
impl<T: Copy + std::ops::Sub<Output = T>> RangeLen<T> for std::ops::Range<T> {
fn len(&self) -> T {
self.end - self.start
}
}