5 compile errors left

This commit is contained in:
🪞👃🪞 2024-09-07 16:44:49 +03:00
parent 7bcd40b425
commit b3f0f60400
13 changed files with 462 additions and 180 deletions

View file

@ -201,7 +201,14 @@ pub enum TuiEvent {
/// Rendering unit struct to Ratatui returns zero-sized [Area] at render coordinates.
impl Render<Tui> for () {
fn render (&self, to: &mut Tui) -> Perhaps<[u16;4]> {
Ok(Some([to.area.x(), to.area.y(), 0, 0]))
self.layout(to.area())
}
}
/// Layout of unit struct in Ratatui is zero-sized [Area] at render coordinates.
impl Layout<Tui> for () {
fn layout (&self, area: [u16;4]) -> Perhaps<[u16;4]> {
Ok(Some([area.x(), area.y(), 0, 0]))
}
}