mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
21 lines
521 B
Rust
21 lines
521 B
Rust
fn main() {
|
|
'running: loop {
|
|
for event in event_pump.poll_iter() {
|
|
match event {
|
|
Event::Quit {..} | Event::KeyDown { keycode: Some(Keycode::Escape), .. } => break 'running,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main2() {
|
|
'running: loop {
|
|
for event in event_pump.poll_iter() {
|
|
match event {
|
|
Event::Quit {..} |
|
|
Event::KeyDownXXXXXXXXXXXXX { keycode: Some(Keycode::Escape), .. } => break 'running,
|
|
}
|
|
}
|
|
}
|
|
}
|