Skip to content

Commit 8b512ad

Browse files
emilkhacknus
authored andcommitted
Enforce eframe errors are Send and Sync (emilk#4574)
* Follow-up to emilk#4565
1 parent d304cbf commit 8b512ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/eframe/src/epi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub type EventLoopBuilderHook = Box<dyn FnOnce(&mut EventLoopBuilder<UserEvent>)
4141
#[cfg(any(feature = "glow", feature = "wgpu"))]
4242
pub type WindowBuilderHook = Box<dyn FnOnce(egui::ViewportBuilder) -> egui::ViewportBuilder>;
4343

44-
type DynError = Box<dyn std::error::Error>;
44+
type DynError = Box<dyn std::error::Error + Send + Sync>;
4545

4646
/// This is how your app is created.
4747
///

crates/eframe/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ pub fn run_simple_native(
334334
#[derive(Debug)]
335335
pub enum Error {
336336
/// Something went wrong in user code when creating the app.
337-
AppCreation(Box<dyn std::error::Error>),
337+
AppCreation(Box<dyn std::error::Error + Send + Sync>),
338338

339339
/// An error from [`winit`].
340340
#[cfg(not(target_arch = "wasm32"))]

0 commit comments

Comments
 (0)