Add EventLoop::builder, which replaces EventLoopBuilder::new
Similarly for EventLoop::with_user_event and EventLoopBuilder::with_user_event
This commit is contained in:
parent
569c44a632
commit
8862ce0163
3 changed files with 31 additions and 23 deletions
|
|
@ -5,7 +5,7 @@ fn main() -> Result<(), impl std::error::Error> {
|
|||
use simple_logger::SimpleLogger;
|
||||
use winit::{
|
||||
event::{Event, WindowEvent},
|
||||
event_loop::EventLoopBuilder,
|
||||
event_loop::EventLoop,
|
||||
window::Window,
|
||||
};
|
||||
|
||||
|
|
@ -18,9 +18,7 @@ fn main() -> Result<(), impl std::error::Error> {
|
|||
}
|
||||
|
||||
SimpleLogger::new().init().unwrap();
|
||||
let event_loop = EventLoopBuilder::<CustomEvent>::with_user_event()
|
||||
.build()
|
||||
.unwrap();
|
||||
let event_loop = EventLoop::<CustomEvent>::with_user_event().build().unwrap();
|
||||
|
||||
let window = Window::builder()
|
||||
.with_title("A fantastic window!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue