2016-04-15 11:11:20 -05:00
|
|
|
fn main() {
|
|
|
|
'running: loop {
|
|
|
|
for event in event_pump.poll_iter() {
|
|
|
|
match event {
|
2017-11-16 01:42:11 -06:00
|
|
|
Event::Quit { .. }
|
|
|
|
| Event::KeyDown {
|
2017-07-03 04:54:26 -05:00
|
|
|
keycode: Some(Keycode::Escape),
|
|
|
|
..
|
|
|
|
} => break 'running,
|
2016-04-15 11:11:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main2() {
|
|
|
|
'running: loop {
|
|
|
|
for event in event_pump.poll_iter() {
|
|
|
|
match event {
|
2017-11-16 01:42:11 -06:00
|
|
|
Event::Quit { .. }
|
|
|
|
| Event::KeyDownXXXXXXXXXXXXX {
|
2017-07-03 04:54:26 -05:00
|
|
|
keycode: Some(Keycode::Escape),
|
|
|
|
..
|
|
|
|
} => break 'running,
|
2016-04-15 11:11:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|