mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
wip: doctest layouts
This commit is contained in:
parent
5ca329292f
commit
cd5b0cc113
3 changed files with 57 additions and 36 deletions
|
|
@ -44,6 +44,14 @@ impl Interpret<Tui, Color> for State {
|
|||
}
|
||||
}
|
||||
}
|
||||
fn try_to_u8 (src: Perhaps<&str>) -> Perhaps<u8> {
|
||||
use std::str::FromStr;
|
||||
if let Some(src) = src? {
|
||||
Ok(Some(u8::from_str(src)?))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
impl Interpret<Tui, Option<XYWH<u16>>> for State {
|
||||
fn interpret_word (&self, to: &mut Tui, sym: &impl Language) -> Perhaps<XYWH<u16>> {
|
||||
match sym.src()? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue