chiark
/
gitweb
/
~ian
/
mastodonochrome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f44652
)
Allow error reporting as a PhysicalAction.
author
Simon Tatham
<anakin@pobox.com>
Fri, 29 Dec 2023 11:09:46 +0000
(11:09 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Fri, 29 Dec 2023 11:09:46 +0000
(11:09 +0000)
Could easily come in useful!
src/tui.rs
patch
|
blob
|
history
diff --git
a/src/tui.rs
b/src/tui.rs
index e3177570daee704fc733a86bf6147feba42c9ed6..7602efc1e69c18e25f79626ede5a5573e7d98f9c 100644
(file)
--- a/
src/tui.rs
+++ b/
src/tui.rs
@@
-124,6
+124,7
@@
pub enum PhysicalAction {
Nothing,
Beep,
Exit,
+ Error(TuiError),
}
pub struct Tui {
@@
-289,11
+290,14
@@
impl Tui {
Self::beep()?
},
- // FIXME: errors?
PhysicalAction::Exit => {
break 'outer Ok(());
},
+ PhysicalAction::Error(err) => {
+ break 'outer Err(err);
+ },
+
PhysicalAction::Nothing => (),
}
}