mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
egui-wgpu: Fix crash on zero-sized scissor rects (#2039)
This commit is contained in:
@@ -74,7 +74,13 @@ pub trait App {
|
||||
/// Can be used from web to interact or other external context
|
||||
/// Implementation is needed, because downcasting Box<dyn App> -> Box<dyn Any> to get &ConcreteApp is not simple in current rust.
|
||||
///
|
||||
/// Just return &mut *self
|
||||
/// Just copy-paste this as your implementation:
|
||||
/// ```ignore
|
||||
/// #[cfg(target_arch = "wasm32")]
|
||||
/// fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
|
||||
/// &mut *self
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn as_any_mut(&mut self) -> &mut dyn Any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user