mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
refactor: better error handling for client initialization
This commit is contained in:
parent
1b35354272
commit
9245188af7
10 changed files with 97 additions and 49 deletions
|
@ -13,7 +13,6 @@ use gtk::prelude::*;
|
|||
use gtk::{Button, EventBox, Image, Label, Orientation, RadioButton, Widget};
|
||||
use serde::Deserialize;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::{broadcast, mpsc};
|
||||
use tracing::{debug, error};
|
||||
|
||||
|
@ -76,7 +75,7 @@ impl Module<Button> for ClipboardModule {
|
|||
let max_items = self.max_items;
|
||||
|
||||
let tx = context.tx.clone();
|
||||
let client: Arc<clipboard::Client> = context.client();
|
||||
let client = context.client::<clipboard::Client>();
|
||||
|
||||
// listen to clipboard events
|
||||
spawn(async move {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue