Skip to content

Commit

Permalink
fix: Inline escape button press match guard
Browse files Browse the repository at this point in the history
  • Loading branch information
foresterre committed Nov 6, 2023
1 parent a7a9498 commit 5ab3eac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/backend_piston_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ pub(crate) fn show(config: Config) -> MVResult<MiniView> {
window.close_window();
return Ok(());
}
Event::Input(Input::Button(ButtonArgs { button, .. }), _)
if button == Button::Keyboard(Key::Escape) =>
{
Event::Input(
Input::Button(ButtonArgs {
button: Button::Keyboard(Key::Escape),
..
}),
_,
) => {
window.close_window();
return Ok(());
}
Expand Down

0 comments on commit 5ab3eac

Please sign in to comment.