A for-loop syntax I would use a lot:
for match event in events {
Event::KeyUp(...) => ...,
Event::KeyDown(...) => ...,
...
}
Instead of:
for event in events {
match event {
Event::KeyUp(...) => ...,
Event::KeyDown(...) => ...,
...
}
}
Conversation
Yup! I think this has been proposed a few times in Rust's history, along with `fn match`... not sure what became of those proposals though. Might have predated the formal RFCs?
1
2

