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