Skip to content

Commit

Permalink
Make floem::launch accept an FnOnce (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusGix authored Feb 7, 2024
1 parent 257c484 commit 4a3636e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ thread_local! {
pub(crate) static APP_UPDATE_EVENTS: RefCell<Vec<AppUpdateEvent>> = Default::default();
}

pub fn launch<V: View + 'static>(app_view: impl Fn() -> V + 'static) {
pub fn launch<V: View + 'static>(app_view: impl FnOnce() -> V + 'static) {
Application::new().window(move |_| app_view(), None).run()
}

Expand Down

0 comments on commit 4a3636e

Please sign in to comment.