wip: refactor pt.28: 16 errors

This commit is contained in:
🪞👃🪞 2024-11-14 16:08:59 +01:00
parent 4522ebaa4b
commit ceead4131c
7 changed files with 84 additions and 62 deletions

View file

@ -1,9 +1,15 @@
use crate::*;
pub trait StatusBar<E: Engine>: Widget<Engine = E> {
fn hotkey_fg () -> Color;
pub trait StatusBar<E: Engine, S>: Widget<Engine = E> {
fn hotkey_fg () -> Color where Self: Sized;
fn command (commands: &[[impl Widget<Engine = Tui>;3]]) -> impl Widget<Engine = Tui> + '_ {
fn update (&mut self, state: &S);
fn command (commands: &[[impl Widget<Engine = Tui>;3]])
-> impl Widget<Engine = Tui> + '_
where
Self: Sized
{
let hotkey_fg = Self::hotkey_fg();
Stack::right(move |add|{
Ok(for [a, b, c] in commands.iter() {