1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-04 04:01:03 +02:00

refactor: fix a couple of clippy warnings

This commit is contained in:
Jake Stanger 2022-08-15 21:11:17 +01:00
parent 8576ac5c44
commit 7625635050
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 29 additions and 23 deletions

View file

@ -51,13 +51,13 @@ impl Module<gtk::Box> for WorkspacesModule {
let raw = sway.ipc(IpcCommand::GetWorkspaces).unwrap();
let workspaces = serde_json::from_slice::<Vec<Workspace>>(&raw).unwrap();
if !self.all_monitors {
if self.all_monitors {
workspaces
} else {
workspaces
.into_iter()
.filter(|workspace| workspace.output == info.output_name)
.collect()
} else {
workspaces
}
};