Skip to content

refactor(examples): use crossterm event methods#1792

Merged
joshka merged 2 commits intomainfrom
jm/crossterm-29
May 10, 2025
Merged

refactor(examples): use crossterm event methods#1792
joshka merged 2 commits intomainfrom
jm/crossterm-29

Conversation

@joshka
Copy link
Copy Markdown
Member

@joshka joshka commented Apr 16, 2025

Crossterm 0.29 introduced methods to easily check / extract the event
type. E.g. as_key_press_event() and is_key_press(). This commit
updates the examples to use these methods instead of matching on
the event type. This makes the code cleaner and easier to read.

Also does a general cleanup of the event handling code in the examples.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants