diff options
author | rabite <rabite@posteo.de> | 2019-02-28 18:43:11 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-02-28 18:48:37 +0100 |
commit | 06817602a8559e8c214c7f68d804ee1d7d9ffd77 (patch) | |
tree | ab3672a6f7f43c478ff8783f4d8a99d5a05e487a /src/hbox.rs | |
parent | fd67621dee25990cca67766865ec3e991b5bf11e (diff) |
view exec'd processes status/output
Diffstat (limited to 'src/hbox.rs')
-rw-r--r-- | src/hbox.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hbox.rs b/src/hbox.rs index 23c580b..7e27656 100644 --- a/src/hbox.rs +++ b/src/hbox.rs @@ -2,6 +2,7 @@ use termion::event::{Event}; use crate::widget::Widget; use crate::coordinates::{Coordinates, Size, Position}; +use crate::fail::HResult; #[derive(PartialEq)] pub struct HBox<T: Widget> { @@ -106,7 +107,8 @@ impl<T> Widget for HBox<T> where T: Widget + PartialEq { self.coordinates = coordinates.clone(); self.refresh(); } - fn on_event(&mut self, event: Event) { - self.widgets.last_mut().unwrap().on_event(event); + fn on_event(&mut self, event: Event) -> HResult<()> { + self.widgets.last_mut()?.on_event(event).ok(); + Ok(()) } } |