Skip to content

Commit

Permalink
update egui usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nickysemenza committed Jul 11, 2024
1 parent 735530a commit 701d278
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion food_ui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn main() -> eframe::Result<()> {
options,
Box::new(|cc| {
egui_extras::install_image_loaders(&cc.egui_ctx);
Box::<food_ui::MyApp>::default()
Ok(Box::<food_ui::MyApp>::default())
}),
)
}
2 changes: 1 addition & 1 deletion food_web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() -> eframe::Result<()> {
native_options,
Box::new(|cc| {
egui_extras::install_image_loaders(&cc.egui_ctx);
Box::new(MyApp::new(cc))
Ok(Box::new(MyApp::new(cc)))
}),
)
}
Expand Down
5 changes: 1 addition & 4 deletions ingredient-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,7 @@ impl IngredientParser {
}
});

let mut amounts = match amounts {
Some(a) => a,
None => vec![],
};
let mut amounts = amounts.unwrap_or_default();
amounts = match amounts2 {
Some(a) => amounts.into_iter().chain(a.into_iter()).collect(),
None => amounts,
Expand Down

0 comments on commit 701d278

Please sign in to comment.