Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
parasyte committed Jul 17, 2023
1 parent 9325078 commit ee8d031
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/minimal-winit/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
#![deny(clippy::all)]
#![forbid(unsafe_code)]

use std::time::Duration;

use async_winit::dpi::{LogicalSize, PhysicalSize};
use async_winit::event::{ElementState, VirtualKeyCode};
use async_winit::event_loop::EventLoop;
use async_winit::window::WindowBuilder;
use error_iter::ErrorIter as _;
// use futures_lite::{StreamExt as _};
use async_winit::Timer;
use error_iter::ErrorIter as _;
use futures_lite::prelude::*;
use log::error;
use pixels::{Pixels, SurfaceTexture};
use std::time::Duration;
use winit::event::KeyboardInput;

const WIDTH: u32 = 320;
Expand Down Expand Up @@ -88,13 +86,13 @@ fn main() {
// Resize the window
let resize = window.resized().wait_many().map(Events::Resize);

// Update internal state and request a redraw
// Draw the current frame
let redraw = window
.redraw_requested()
.wait_many()
.map(|_| Events::Redraw);

// Periodic timer for 60 fps World updates
// Update internal state and request a redraw
let timer = Timer::interval(Duration::from_micros(16_666)).map(|_| Events::Timer);

let mut events = redraw.or(timer).or(input).or(resize).or(close);
Expand Down

0 comments on commit ee8d031

Please sign in to comment.