gchp / rustbox

Rust implementation of the termbox library
MIT License
469 stars 48 forks source link

remove Option from KeyEvent #51

Closed benaryorg closed 8 years ago

benaryorg commented 9 years ago

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:

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.

benaryorg commented 9 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).

gchp commented 8 years ago

@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.