edn stub examples are now runnable

the Render/Content trait pair is very finicky
This commit is contained in:
🪞👃🪞 2025-01-05 04:57:42 +01:00
parent f1b3fc0040
commit f6c603bf73
9 changed files with 69 additions and 56 deletions

View file

@ -65,7 +65,7 @@ impl TuiOut {
}
}
impl Render<Tui> for &str {
impl Content<Tui> for &str {
fn layout (&self, to: [u16;4]) -> [u16;4] {
to.center_xy([self.chars().count() as u16, 1])
}
@ -74,7 +74,7 @@ impl Render<Tui> for &str {
}
}
impl Render<Tui> for String {
impl Content<Tui> for String {
fn layout (&self, to: [u16;4]) -> [u16;4] {
to.center_xy([self.chars().count() as u16, 1])
}