Closed benaryorg closed 8 years ago
I made the changes to my fork, if you want to have a look.
I if you want to merge it, just say so, I'll send a PR (the version bump would then be up to you).
@benaryorg sorry for the super long delay on getting back to you here.
A PR for this would be welcomed! Thank you for taking the time on it.
I just wrote a small event-loop and noticed the
Some
I needed to place everywhere.After a while it gets a little annoying. So I'm suggesting the following change:
KeyEvent
will beKeyEvent(Key)
Key
enum will contain something like anUnhandled
orOther
element wrapping anu16
Key::from_code(u16)
will not return anOption
but aKey
and in the_
branch returnsKey::Unhandled(code)
The functionality stays the same but solved more "rust-like" as we can use more beautiful match-branches.
Edit: If you are okay with the proposed changes I would like to send this as a PR to make your life a bit easier.