Indirection on new_pressed_key - #389
Conversation
|
Hmm. Previously, when the implementation returns It's not obvious to me whether it's better to have a |
017ba6e to
c304e51
Compare
c304e51 to
c889109
Compare
|
Good news is, the test suite is quite comprehensive if it's catching issues. |
|
Okay, tests pass again. But:
|
|
Similarly, for the same reason we want factor out |
|
Regarding common code: it's true that lots of the code is common, especially in how the pending key state is handled in process_input and handle_event.. but, since both these methods mutably borrow self ( There might be some way, but I can't think of how to do it nicely. |
Towards #381, one blocker is that various
key::Keyimplementations themselves invokekey::Key::new_pressed_key.This PR is to rearrange the types so that these invocations instead return some kind of value.