diff --git a/cli/tek.rs b/cli/tek.rs index 0f5ce513..06930bf4 100644 --- a/cli/tek.rs +++ b/cli/tek.rs @@ -2,7 +2,7 @@ pub use tek::*; pub(crate) use clap::{self, Parser, Subcommand}; /// Application entrypoint. pub fn main () -> Usually<()> { - TekCli::parse().run() + TekCli::parse().run() } #[test] fn verify_cli () { use clap::CommandFactory; diff --git a/output/src/area.rs b/output/src/area.rs index 8c669da1..261ba54c 100644 --- a/output/src/area.rs +++ b/output/src/area.rs @@ -76,6 +76,13 @@ pub trait Area: From<[N;4]> + Debug + Copy { #[inline] fn centered (&self) -> [N;2] { [self.x().minus(self.w()/2.into()), self.y().minus(self.h()/2.into())] } + + fn iter_x (&self) -> impl Iterator where N: std::iter::Step { + self.x()..(self.x()+self.w()) + } + fn iter_y (&self) -> impl Iterator where N: std::iter::Step { + self.y()..(self.y()+self.h()) + } } impl Area for (N, N, N, N) { diff --git a/output/src/lib.rs b/output/src/lib.rs index 3b27b6b6..f6353d1e 100644 --- a/output/src/lib.rs +++ b/output/src/lib.rs @@ -1,4 +1,5 @@ //#![feature(lazy_type_alias)] +#![feature(step_trait)] #![feature(type_alias_impl_trait)] #![feature(impl_trait_in_assoc_type)] mod direction; pub use self::direction::*;