mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-02 19:21:03 +02:00
refactor: fix new clippy warnings
This commit is contained in:
parent
27f920d012
commit
cc181a8b6d
13 changed files with 42 additions and 43 deletions
|
@ -111,7 +111,7 @@ impl Module<Button> for ClipboardModule {
|
|||
while let Some(event) = rx.recv().await {
|
||||
let client = clipboard::get_client();
|
||||
match event {
|
||||
UIEvent::Copy(id) => client.copy(id).await,
|
||||
UIEvent::Copy(id) => client.copy(id),
|
||||
UIEvent::Remove(id) => client.remove(id),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::config::{CommonConfig, TruncateMode};
|
|||
use crate::gtk_helpers::add_class;
|
||||
use crate::image::ImageProvider;
|
||||
use crate::modules::{Module, ModuleInfo, ModuleUpdateEvent, ModuleWidget, WidgetContext};
|
||||
use crate::{send_async, try_send};
|
||||
use crate::{lock, send_async, try_send};
|
||||
use color_eyre::Result;
|
||||
use glib::Continue;
|
||||
use gtk::prelude::*;
|
||||
|
@ -52,7 +52,8 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
) -> Result<()> {
|
||||
spawn(async move {
|
||||
let (mut wlrx, handles) = {
|
||||
let wl = wayland::get_client().await;
|
||||
let wl = wayland::get_client();
|
||||
let wl = lock!(wl);
|
||||
wl.subscribe_toplevels()
|
||||
};
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
let tx = tx2;
|
||||
|
||||
let (mut wlrx, handles) = {
|
||||
let wl = wayland::get_client().await;
|
||||
let wl = wayland::get_client();
|
||||
let wl = lock!(wl);
|
||||
wl.subscribe_toplevels()
|
||||
};
|
||||
|
||||
|
@ -270,7 +271,7 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
} else {
|
||||
send_async!(tx, ModuleUpdateEvent::ClosePopup);
|
||||
|
||||
let wl = wayland::get_client().await;
|
||||
let wl = wayland::get_client();
|
||||
let items = lock!(items);
|
||||
|
||||
let id = match event {
|
||||
|
@ -291,13 +292,16 @@ impl Module<gtk::Box> for LauncherModule {
|
|||
{
|
||||
debug!("Focusing window {id}: {}", window.name);
|
||||
|
||||
let seat = wl.get_seats().pop().expect("Failed to get Wayland seat");
|
||||
let seat = lock!(wl)
|
||||
.get_seats()
|
||||
.pop()
|
||||
.expect("Failed to get Wayland seat");
|
||||
window.focus(&seat);
|
||||
}
|
||||
}
|
||||
|
||||
// roundtrip to immediately send activate event
|
||||
wl.roundtrip();
|
||||
lock!(wl).roundtrip();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue