mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
@@ -16,7 +16,7 @@ pub struct EventLoop<T: 'static> {
|
||||
elw: RootEventLoopWindowTarget<T>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Copy, Clone, PartialEq, Hash)]
|
||||
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct PlatformSpecificEventLoopAttributes {}
|
||||
|
||||
impl<T> EventLoop<T> {
|
||||
|
||||
@@ -456,11 +456,8 @@ impl<T: 'static> Shared<T> {
|
||||
ControlFlow::ExitWithCode(_) => State::Exit,
|
||||
};
|
||||
|
||||
match *self.0.runner.borrow_mut() {
|
||||
RunnerEnum::Running(ref mut runner) => {
|
||||
runner.state = new_state;
|
||||
}
|
||||
_ => (),
|
||||
if let RunnerEnum::Running(ref mut runner) = *self.0.runner.borrow_mut() {
|
||||
runner.state = new_state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,7 @@ pub enum State {
|
||||
|
||||
impl State {
|
||||
pub fn is_exit(&self) -> bool {
|
||||
match self {
|
||||
State::Exit => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, State::Exit)
|
||||
}
|
||||
|
||||
pub fn control_flow(&self) -> ControlFlow {
|
||||
|
||||
Reference in New Issue
Block a user