Bugfix - don't return unless Some
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 6 Feb 2021 16:02:53 +0000 (17:02 +0100)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 6 Feb 2021 16:02:53 +0000 (17:02 +0100)
src/core/app.rs

index 18be50c..d440eb3 100644 (file)
@@ -248,7 +248,9 @@ impl App {
                 }
                 _ => {
                    if let Some(state) = self.states.last_mut() {
-                       return state.handle_event(event)
+                       if let Some(change) = state.handle_event(event) {
+                           return Some(change);
+                       }
                    } else {
                        return Some(StateChange::Exit)
                    }