wip: and sweeps right through the codebase

This commit is contained in:
🪞👃🪞 2024-12-31 02:03:16 +01:00
parent d37bd3e0c5
commit c9b09b7dea
16 changed files with 370 additions and 625 deletions

View file

@ -46,11 +46,11 @@ pub type Perhaps<T> = Result<Option<T>, Box<dyn Error>>;
fn area_mut (&mut self) -> &mut [u16;4] {
&mut self.0
}
fn render_in (&mut self, _: [u16;4], _: &impl Render<TestEngine>) -> Usually<()> {
Ok(())
fn place (&mut self, _: [u16;4], _: &impl Layout<TestEngine>) {
()
}
}
impl Render<TestEngine> for String {
impl Layout<TestEngine> for String {
fn render (&self, to: &mut TestOutput) {
to.area_mut().set_w(self.len() as u16);
}
@ -63,7 +63,7 @@ pub type Perhaps<T> = Result<Option<T>, Box<dyn Error>>;
use std::sync::{Arc, RwLock};
struct TestComponent(String);
impl Layout<Tui> for TestComponent {
fn layout (&self) -> Option<impl Render<Tui>> {
fn layout (&self) -> Option<impl Layout<Tui>> {
Some(self.0.as_str())
}
}