perf: refactor to reduce memory allocations and cpu work

This commit is contained in:
Cheong Lau 2025-10-05 16:36:59 +10:00 committed by Michael Murphy
parent 0c3e3c8629
commit dd0158d8f0
24 changed files with 234 additions and 242 deletions

View file

@ -351,7 +351,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
}
fn subscription(&self) -> Subscription<Message> {
Subscription::batch(vec![
Subscription::batch([
workspaces().map(Message::WorkspaceUpdate),
event::listen_with(|e, _, _| match e {
Mouse(mouse::Event::WheelScrolled { delta }) => Some(Message::WheelScrolled(delta)),