mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
big flat pt.13: fixed warnings, let's see what it has in store
This commit is contained in:
parent
e21ef1af94
commit
5bc3517dde
13 changed files with 68 additions and 45 deletions
|
|
@ -73,14 +73,14 @@ impl<'a, E: Engine, const N: usize> Iterator for CollectIterator<'a, E, N> {
|
|||
type Item = &'a dyn Render<E>;
|
||||
fn next (&mut self) -> Option<Self::Item> {
|
||||
match self.1 {
|
||||
Collect::Callback(callback) => {
|
||||
Collect::Callback(_callback) => {
|
||||
todo!()
|
||||
},
|
||||
//Collection::Iterator(iterator) => {
|
||||
//iterator.next()
|
||||
//},
|
||||
Collect::Array(array) => {
|
||||
if let Some(item) = array.get(self.0) {
|
||||
if let Some(_item) = array.get(self.0) {
|
||||
self.0 += 1;
|
||||
//Some(item)
|
||||
None
|
||||
|
|
@ -89,7 +89,7 @@ impl<'a, E: Engine, const N: usize> Iterator for CollectIterator<'a, E, N> {
|
|||
}
|
||||
}
|
||||
Collect::Slice(slice) => {
|
||||
if let Some(item) = slice.get(self.0) {
|
||||
if let Some(_item) = slice.get(self.0) {
|
||||
self.0 += 1;
|
||||
//Some(item)
|
||||
None
|
||||
|
|
@ -118,10 +118,10 @@ pub struct Reduce<E: Engine, T, I: Iterator<Item=T>, R: Render<E>, F: Fn(&dyn Re
|
|||
);
|
||||
|
||||
impl<E: Engine, T, I: Iterator<Item=T>+Send+Sync, R: Render<E>, F: Fn(&dyn Render<E>, T)->R+Send+Sync> Render<E> for Reduce<E, T, I, R, F> {
|
||||
fn min_size (&self, to: E::Size) -> Perhaps<E::Size> {
|
||||
fn min_size (&self, _to: E::Size) -> Perhaps<E::Size> {
|
||||
todo!()
|
||||
}
|
||||
fn render (&self, to: &mut E::Output) -> Usually<()> {
|
||||
fn render (&self, _to: &mut E::Output) -> Usually<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ where
|
|||
West => {
|
||||
let w: E::Unit = 0.into();
|
||||
let h: E::Unit = 0.into();
|
||||
(self.0)(&mut |component: &dyn Render<E>| {
|
||||
(self.0)(&mut |_component: &dyn Render<E>| {
|
||||
if w < to.w() {
|
||||
todo!();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
pub use ::tek_engine;
|
||||
pub(crate) use ::tek_engine::*;
|
||||
|
||||
pub(crate) use std::marker::PhantomData;
|
||||
pub(crate) use std::sync::atomic::Ordering::*;
|
||||
|
||||
mod collection; pub use self::collection::*;
|
||||
mod direction; pub use self::direction::*;
|
||||
mod logic; pub use self::logic::*;
|
||||
mod space; pub use self::space::*;
|
||||
mod transform; pub use self::transform::*;
|
||||
|
||||
pub use ::tek_engine;
|
||||
pub(crate) use ::tek_engine::*;
|
||||
pub(crate) use std::marker::PhantomData;
|
||||
|
||||
#[cfg(test)] #[test] fn test_layout () -> Usually<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue