From d9633f379dde483e41c362ac586b849743c19c48 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Sun, 23 Aug 2026 19:03:19 +0200 Subject: [PATCH] change file dialog callback type from FnMut to FnOnce --- ui-rs/src/ui/window.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } } -- 2.52.0