mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-02 03:01:04 +02:00
refactor: fix a couple of clippy warnings
This commit is contained in:
parent
8576ac5c44
commit
7625635050
4 changed files with 29 additions and 23 deletions
|
@ -73,10 +73,7 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
|
||||
{
|
||||
rx.attach(None, move |node| {
|
||||
let value = node
|
||||
.name
|
||||
.as_deref()
|
||||
.unwrap_or_else(|| node.get_id());
|
||||
let value = node.name.as_deref().unwrap_or_else(|| node.get_id());
|
||||
|
||||
let pixbuf = icon::get_icon(&icon_theme, node.get_id(), self.icon_size);
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue