Remove block_on in calls to State update & render

This commit is contained in:
Linus Unnebäck 2020-05-09 14:07:07 +01:00 committed by GitHub
parent 1dcbae76fd
commit 1f30a90951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,8 +301,8 @@ event_loop.run(move |event, _, control_flow| {
match event {
// ...
Event::RedrawRequested(_) => {
block_on(state.update());
block_on(state.render());
state.update();
state.render();
}
Event::MainEventsCleared => {
// RedrawRequested will only trigger once, unless we manually