From: Olaf Wintermann Date: Sun, 23 Aug 2026 17:03:19 +0000 (+0200) Subject: change file dialog callback type from FnMut to FnOnce X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=d9633f379dde483e41c362ac586b849743c19c48;p=note.git change file dialog callback type from FnMut to FnOnce --- diff --git a/ui-rs/src/ui/window.rs b/ui-rs/src/ui/window.rs index 9d22925..8f7320d 100644 --- a/ui-rs/src/ui/window.rs +++ b/ui-rs/src/ui/window.rs @@ -455,17 +455,17 @@ impl toolkit::UiObject { } pub fn openfile_dialog(&self, multiselect: bool, callback: F) - where F: FnMut(&mut event::Event) + 'static { + where F: FnOnce(&mut event::Event) + 'static { openfile_dialog(self, multiselect as c_uint, callback); } pub fn selectdirectory_dialog(&self, callback: F) - where F: FnMut(&mut event::Event) + 'static { + where F: FnOnce(&mut event::Event) + 'static { openfile_dialog(self, 2, callback); } pub fn savefile_dialog(&self, name: &str, callback: F) - where F: FnMut(&mut event::Event) + 'static { + where F: FnOnce(&mut event::Event) + 'static { savefile_dialog(self, name, callback); } }