1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

refactor: fix new clippy warnings

This commit is contained in:
Jake Stanger 2023-06-29 16:57:47 +01:00
parent 27f920d012
commit cc181a8b6d
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
13 changed files with 42 additions and 43 deletions

View file

@ -7,7 +7,6 @@ mod wlr_foreign_toplevel;
use self::wlr_foreign_toplevel::manager::ToplevelManagerState;
use crate::{delegate_foreign_toplevel_handle, delegate_foreign_toplevel_manager};
use async_once::AsyncOnce;
use cfg_if::cfg_if;
use lazy_static::lazy_static;
use smithay_client_toolkit::output::OutputState;
@ -18,6 +17,7 @@ use smithay_client_toolkit::{
delegate_output, delegate_registry, delegate_seat, registry_handlers,
};
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use tokio::sync::broadcast;
use wayland_client::protocol::wl_seat::WlSeat;
@ -33,7 +33,6 @@ cfg_if! {
use self::wlr_data_control::manager::DataControlDeviceManagerState;
use self::wlr_data_control::source::CopyPasteSource;
use self::wlr_data_control::SelectionOfferItem;
use std::sync::{Arc, Mutex};
pub use wlr_data_control::{ClipboardItem, ClipboardValue};
@ -106,10 +105,9 @@ impl ProvidesRegistryState for Environment {
}
lazy_static! {
static ref CLIENT: AsyncOnce<WaylandClient> =
AsyncOnce::new(async { WaylandClient::new().await });
static ref CLIENT: Arc<Mutex<WaylandClient>> = Arc::new(Mutex::new(WaylandClient::new()));
}
pub async fn get_client() -> &'static WaylandClient {
CLIENT.get().await
pub fn get_client() -> Arc<Mutex<WaylandClient>> {
CLIENT.clone()
}