Browse Source

Enforce eframe errors are `Send` and `Sync` (#4574)

* Follow-up to https://github.com/emilk/egui/pull/4565
pull/4577/head
Emil Ernerfeldt 5 months ago
committed by GitHub
parent
commit
913cef3361
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      crates/eframe/src/epi.rs
  2. 2
      crates/eframe/src/lib.rs

2
crates/eframe/src/epi.rs

@ -41,7 +41,7 @@ pub type EventLoopBuilderHook = Box<dyn FnOnce(&mut EventLoopBuilder<UserEvent>)
#[cfg(any(feature = "glow", feature = "wgpu"))] #[cfg(any(feature = "glow", feature = "wgpu"))]
pub type WindowBuilderHook = Box<dyn FnOnce(egui::ViewportBuilder) -> egui::ViewportBuilder>; pub type WindowBuilderHook = Box<dyn FnOnce(egui::ViewportBuilder) -> egui::ViewportBuilder>;
type DynError = Box<dyn std::error::Error>; type DynError = Box<dyn std::error::Error + Send + Sync>;
/// This is how your app is created. /// This is how your app is created.
/// ///

2
crates/eframe/src/lib.rs

@ -334,7 +334,7 @@ pub fn run_simple_native(
#[derive(Debug)] #[derive(Debug)]
pub enum Error { pub enum Error {
/// Something went wrong in user code when creating the app. /// Something went wrong in user code when creating the app.
AppCreation(Box<dyn std::error::Error>), AppCreation(Box<dyn std::error::Error + Send + Sync>),
/// An error from [`winit`]. /// An error from [`winit`].
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]

Loading…
Cancel
Save