mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Make eframe::App::as_any_mut optional to implement (#2061)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use core::any::Any;
|
||||
|
||||
use eframe::egui_glow;
|
||||
use egui::mutex::Mutex;
|
||||
use egui_glow::glow;
|
||||
@@ -51,11 +48,6 @@ impl eframe::App for Custom3d {
|
||||
self.rotating_triangle.lock().destroy(gl);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
&mut *self
|
||||
}
|
||||
}
|
||||
|
||||
impl Custom3d {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use core::any::Any;
|
||||
|
||||
use eframe::{
|
||||
egui_wgpu::{self, wgpu},
|
||||
wgpu::util::DeviceExt,
|
||||
@@ -120,11 +117,6 @@ impl eframe::App for Custom3d {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
&mut *self
|
||||
}
|
||||
}
|
||||
|
||||
impl Custom3d {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
use egui_extras::RetainedImage;
|
||||
use poll_promise::Promise;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use core::any::Any;
|
||||
|
||||
struct Resource {
|
||||
/// HTTP response
|
||||
response: ehttp::Response,
|
||||
@@ -109,11 +106,6 @@ impl eframe::App for HttpApp {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any {
|
||||
&mut *self
|
||||
}
|
||||
}
|
||||
|
||||
fn ui_url(ui: &mut egui::Ui, frame: &mut eframe::Frame, url: &mut String) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user