summaryrefslogtreecommitdiff
path: root/examples/custom_keypad
diff options
context:
space:
mode:
authorEmil Ernerfeldt <emil.ernerfeldt@gmail.com>2024-05-28 21:59:19 +0200
committerGitHub <noreply@github.com>2024-05-28 21:59:19 +0200
commit942fe4ab314323a66077fece4655c6e8e8c810a8 (patch)
tree1adb94ba164a5d9b6ace47ca6e5b31506c7f8b22 /examples/custom_keypad
parent54429e0549e829c64b8de1b66f846fdf1a7ee37c (diff)
Support returning errors when creating the app (#4565)
The closure passed to `eframe::run_native` now returns a `Result`, allowing you to return an error during app creation, which will be returned to the caller of `run_native`. This means you need to wrap your `Box::new(MyApp::new(…))` in an `Ok(…)`. * Closes https://github.com/emilk/egui/issues/4474
Diffstat (limited to 'examples/custom_keypad')
-rw-r--r--examples/custom_keypad/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/custom_keypad/src/main.rs b/examples/custom_keypad/src/main.rs
index 654de25f..d72d520a 100644
--- a/examples/custom_keypad/src/main.rs
+++ b/examples/custom_keypad/src/main.rs
@@ -20,7 +20,7 @@ fn main() -> Result<(), eframe::Error> {
// This gives us image support:
egui_extras::install_image_loaders(&cc.egui_ctx);
- Box::<MyApp>::default()
+ Ok(Box::<MyApp>::default())
}),
)
}