|
@@ -321,7 +321,7 @@ impl<R: Runtime> Window<R> {
|
|
/// Listen to an event on this window a single time.
|
|
/// Listen to an event on this window a single time.
|
|
pub fn once<F>(&self, event: impl Into<String>, handler: F) -> EventHandler
|
|
pub fn once<F>(&self, event: impl Into<String>, handler: F) -> EventHandler
|
|
where
|
|
where
|
|
- F: Fn(Event) + Send + 'static,
|
|
|
|
|
|
+ F: FnOnce(Event) + Send + 'static,
|
|
{
|
|
{
|
|
let label = self.window.label.clone();
|
|
let label = self.window.label.clone();
|
|
self.manager.once(event.into(), Some(label), handler)
|
|
self.manager.once(event.into(), Some(label), handler)
|