Pass WindowHandle by value to window::run_with_handle

This commit is contained in:
Héctor Ramón Jiménez 2024-05-08 23:14:37 +02:00
parent 7e7af91e6f
commit 718fe5b7de
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 4 additions and 4 deletions

View file

@ -197,7 +197,7 @@ pub fn change_icon<Message>(id: Id, icon: Icon) -> Command<Message> {
/// Note that if the window closes before this call is processed the callback will not be run.
pub fn run_with_handle<Message>(
id: Id,
f: impl FnOnce(&WindowHandle<'_>) -> Message + 'static,
f: impl FnOnce(WindowHandle<'_>) -> Message + 'static,
) -> Command<Message> {
Command::single(command::Action::Window(Action::RunWithHandle(
id,