more space/ and draw/ modules

- 26 errors and 16 doctest fails
- getting there, perpetually
This commit is contained in:
facile pop culture reference 2026-04-24 02:06:04 +03:00
parent 42a1807c2b
commit 145047b7ff
15 changed files with 269 additions and 232 deletions

View file

@ -645,9 +645,9 @@ pub const fn border <T, S: BorderStyle> (on: bool, style: S, draw: impl Draw<Tui
/// Draw TUI content or its error message.
///
/// ```
/// let _ = tengri::tui::catcher(Ok(Some("hello")));
/// let _ = tengri::tui::catcher(Ok(None));
/// let _ = tengri::tui::catcher(Err("draw fail".into()));
/// let _ = tengri::term::catcher(Ok(Some("hello")));
/// let _ = tengri::term::catcher(Ok(None));
/// let _ = tengri::term::catcher(Err("draw fail".into()));
/// ```
pub fn catcher <T: Draw<Tui>> (result: Usually<T>) -> impl Draw<Tui> {
thunk(move|to: &mut Tui|match result {