From f121bffe9e651fd2ac6deb882f57e1c9b613b7eb Mon Sep 17 00:00:00 2001 From: Arnold Loubriat Date: Wed, 27 Dec 2023 17:40:48 +0100 Subject: [PATCH] fix!: Remove `accesskit_winit::Adapter::update` (#325) --- platforms/winit/src/lib.rs | 4 ---- platforms/winit/src/platform_impl/macos.rs | 5 ----- platforms/winit/src/platform_impl/null.rs | 2 -- platforms/winit/src/platform_impl/unix.rs | 6 ------ platforms/winit/src/platform_impl/windows.rs | 4 ---- 5 files changed, 21 deletions(-) diff --git a/platforms/winit/src/lib.rs b/platforms/winit/src/lib.rs index 94eef7cc7..6c8219b75 100644 --- a/platforms/winit/src/lib.rs +++ b/platforms/winit/src/lib.rs @@ -92,10 +92,6 @@ impl Adapter { self.adapter.process_event(window, event); } - pub fn update(&self, update: TreeUpdate) { - self.adapter.update(update); - } - pub fn update_if_active(&self, updater: impl FnOnce() -> TreeUpdate) { self.adapter.update_if_active(updater); } diff --git a/platforms/winit/src/platform_impl/macos.rs b/platforms/winit/src/platform_impl/macos.rs index 4c9e5356f..db230932d 100644 --- a/platforms/winit/src/platform_impl/macos.rs +++ b/platforms/winit/src/platform_impl/macos.rs @@ -39,11 +39,6 @@ impl Adapter { Self { adapter } } - pub fn update(&self, update: TreeUpdate) { - let events = self.adapter.update(update); - events.raise(); - } - pub fn update_if_active(&self, updater: impl FnOnce() -> TreeUpdate) { if let Some(events) = self.adapter.update_if_active(updater) { events.raise(); diff --git a/platforms/winit/src/platform_impl/null.rs b/platforms/winit/src/platform_impl/null.rs index 279186310..c3be74577 100644 --- a/platforms/winit/src/platform_impl/null.rs +++ b/platforms/winit/src/platform_impl/null.rs @@ -18,8 +18,6 @@ impl Adapter { Self {} } - pub fn update(&self, _update: TreeUpdate) {} - pub fn update_if_active(&self, _updater: impl FnOnce() -> TreeUpdate) {} pub fn process_event(&self, _window: &Window, _event: &WindowEvent) {} diff --git a/platforms/winit/src/platform_impl/unix.rs b/platforms/winit/src/platform_impl/unix.rs index 5eb21e49c..3fd9886aa 100644 --- a/platforms/winit/src/platform_impl/unix.rs +++ b/platforms/winit/src/platform_impl/unix.rs @@ -28,12 +28,6 @@ impl Adapter { } } - pub fn update(&self, update: TreeUpdate) { - if let Some(adapter) = &self.adapter { - adapter.update(update); - } - } - pub fn update_if_active(&self, updater: impl FnOnce() -> TreeUpdate) { if let Some(adapter) = &self.adapter { adapter.update(updater()); diff --git a/platforms/winit/src/platform_impl/windows.rs b/platforms/winit/src/platform_impl/windows.rs index d49574641..1373e6cd7 100644 --- a/platforms/winit/src/platform_impl/windows.rs +++ b/platforms/winit/src/platform_impl/windows.rs @@ -39,10 +39,6 @@ impl Adapter { Self { adapter } } - pub fn update(&self, update: TreeUpdate) { - self.adapter.update(update).raise(); - } - pub fn update_if_active(&self, updater: impl FnOnce() -> TreeUpdate) { if let Some(events) = self.adapter.update_if_active(updater) { events.raise();