eframe: App::on_exit is no longer available for wasm32

It was never called in wasm32, so no need to have it there
This commit is contained in:
Emil Ernerfeldt 2022-12-12 15:29:32 +01:00
parent cb77458f70
commit 0028d3df92
2 changed files with 3 additions and 2 deletions

View file

@ -125,12 +125,14 @@ pub trait App {
///
/// To get a [`glow`] context you need to compile with the `glow` feature flag,
/// and run eframe with the glow backend.
#[cfg(not(target_arch = "wasm32"))]
#[cfg(feature = "glow")]
fn on_exit(&mut self, _gl: Option<&glow::Context>) {}
/// Called once on shutdown, after [`Self::save`].
///
/// If you need to abort an exit use [`Self::on_close_event`].
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(feature = "glow"))]
fn on_exit(&mut self) {}

View file

@ -1,8 +1,7 @@
use egui::{
mutex::{Mutex, MutexGuard},
TexturesDelta,
pos2, Color32, TexturesDelta,
};
pub use egui::{pos2, Color32};
use crate::{epi, App};