Remove unneeded unsafe. Fix unused result return
This commit is contained in:
parent
881de4e3b9
commit
12e110744d
|
@ -86,7 +86,7 @@ impl<'window> App<'window> {
|
|||
let mut cumulative_dt = 0.0;
|
||||
let mut frames_accumulated = 0.0;
|
||||
let mut last_render_time = Instant::now();
|
||||
self.event_loop.run(|event, elwt| {
|
||||
let _ = self.event_loop.run(|event, elwt| {
|
||||
match event {
|
||||
Event::WindowEvent { window_id, event }
|
||||
if window_id == self.render_ctx.window.id() =>
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use winit::{
|
||||
dpi::PhysicalSize,
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::{ControlFlow, EventLoopWindowTarget},
|
||||
window::Window,
|
||||
dpi::PhysicalSize, event::WindowEvent, event_loop::EventLoopWindowTarget, window::Window,
|
||||
};
|
||||
|
||||
pub struct Context<'window> {
|
||||
|
@ -32,7 +29,7 @@ impl<'window> Context<'window> {
|
|||
// - A GPU device to draw to the surface
|
||||
// - A draw command queue
|
||||
log::info!("Initialising window surface...");
|
||||
let surface = unsafe { instance.create_surface(window.clone()) }.unwrap();
|
||||
let surface = instance.create_surface(window.clone()).unwrap();
|
||||
|
||||
log::info!("Requesting GPU adapter...");
|
||||
let adapter = instance
|
||||
|
|
Loading…
Reference in New Issue