Skip to content

Commit

Permalink
Ok-wrap the App struct in the examples
Browse files Browse the repository at this point in the history
The new API expects a Result
  • Loading branch information
crumblingstatue committed Jul 3, 2024
1 parent 86f0093 commit f105a86
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/multi_selection/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"File dialog example",
eframe::NativeOptions::default(),
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/multilingual/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"My egui application",
options,
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/multiple_actions/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"My egui application",
options,
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/persistence/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"My egui application",
options,
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/sandbox/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"My egui application",
options,
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/save_file/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"File dialog example",
eframe::NativeOptions::default(),
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/select_directory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"File dialog example",
eframe::NativeOptions::default(),
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}
2 changes: 1 addition & 1 deletion examples/select_file/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ fn main() -> eframe::Result<()> {
eframe::run_native(
"File dialog example",
eframe::NativeOptions::default(),
Box::new(|ctx| Box::new(MyApp::new(ctx))),
Box::new(|ctx| Ok(Box::new(MyApp::new(ctx)))),
)
}

0 comments on commit f105a86

Please sign in to comment.