control_flow example: fix wait_cancelled logic again (#1511)

This commit is contained in:
Philippe Renon authored and GitHub committed 2020-04-19 13:55:10 -04:00
1 parent d5609729cc
commit 4c4d0916fd
1 file changed
+3 -9
+3 -9
View File
@@ -41,15 +41,9 @@ fn main() {
println!("{:?}", event);
match event {
Event::NewEvents(start_cause) => {
wait_cancelled = mode == Mode::WaitUntil;
match start_cause {
StartCause::ResumeTimeReached {
start: _,
requested_resume: _,
} => {
wait_cancelled = false;
}
_ => (),
wait_cancelled = match start_cause {
StartCause::WaitCancelled { .. } => mode == Mode::WaitUntil,
_ => false,
}
}
Event::WindowEvent { event, .. } => match event {