chore(deps): update rust crate winit to 0.29 (#57)

* chore(deps): update rust crate winit to 0.29

* fix example

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
renovate[bot]
2023-10-24 03:05:53 +03:00
committed by GitHub
parent 7c9d46d01a
commit 7bebf6d11c
2 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ raw-window-handle = "0.5"
[dev-dependencies]
tao = "0.23"
winit = "0.28"
winit = {version = "0.29", default-features = false, features = ["rwh_05"] }
[target."cfg(target_os = \"windows\")".dependencies]
windows-sys = { version = "0.48.0", features = [

View File

@@ -10,7 +10,7 @@ fn main() {
window::WindowBuilder,
};
let event_loop = EventLoop::new();
let event_loop = EventLoop::new().unwrap();
let window = WindowBuilder::new()
.with_decorations(false)
@@ -21,14 +21,14 @@ fn main() {
window.set_title("A fantastic window!");
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
event_loop.run(move |event, event_loop| {
event_loop.set_control_flow(ControlFlow::Wait);
match event {
Event::WindowEvent {
event: WindowEvent::CloseRequested,
..
} => *control_flow = ControlFlow::Exit,
} => event_loop.exit(),
_ => (),
}
});