Skip to content

Commit

Permalink
Enforce eframe errors are Send and Sync (#4574)
Browse files Browse the repository at this point in the history
* Follow-up to #4565
  • Loading branch information
emilk authored May 29, 2024
1 parent 514ee0c commit 913cef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/eframe/src/epi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub type EventLoopBuilderHook = Box<dyn FnOnce(&mut EventLoopBuilder<UserEvent>)
#[cfg(any(feature = "glow", feature = "wgpu"))]
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.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ pub fn run_simple_native(
#[derive(Debug)]
pub enum Error {
/// 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`].
#[cfg(not(target_arch = "wasm32"))]
Expand Down

0 comments on commit 913cef3

Please sign in to comment.