mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-09-15 19:26:58 +02:00
refactor: update to rust 2024, fix strict clippy warnings
This commit is contained in:
parent
79c917857c
commit
202c19efd4
57 changed files with 132 additions and 124 deletions
|
@ -23,7 +23,9 @@ impl Ipc {
|
|||
.join("ironbar-ipc.sock");
|
||||
|
||||
if format!("{}", ipc_socket_file.display()).len() > 100 {
|
||||
warn!("The IPC socket file's absolute path exceeds 100 bytes, the socket may fail to create.");
|
||||
warn!(
|
||||
"The IPC socket file's absolute path exceeds 100 bytes, the socket may fail to create."
|
||||
);
|
||||
}
|
||||
|
||||
Self {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use super::Response;
|
||||
use crate::Ironbar;
|
||||
use crate::bar::Bar;
|
||||
use crate::ipc::{BarCommand, BarCommandType};
|
||||
use crate::modules::PopupButton;
|
||||
use crate::Ironbar;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub fn handle_command(command: BarCommand, ironbar: &Rc<Ironbar>) -> Response {
|
||||
pub fn handle_command(command: &BarCommand, ironbar: &Rc<Ironbar>) -> Response {
|
||||
use BarCommandType::*;
|
||||
|
||||
let bars = ironbar.bars_by_name(&command.name);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::ipc::commands::IronvarCommand;
|
||||
use crate::ipc::Response;
|
||||
use crate::ironvar::{Namespace, WritableNamespace};
|
||||
use crate::Ironbar;
|
||||
use crate::ipc::{IronvarCommand, Response};
|
||||
use crate::ironvar::{Namespace, WritableNamespace};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub fn handle_command(command: IronvarCommand) -> Response {
|
||||
|
|
|
@ -6,8 +6,8 @@ use std::path::Path;
|
|||
use std::rc::Rc;
|
||||
|
||||
use color_eyre::{Report, Result};
|
||||
use gtk::prelude::*;
|
||||
use gtk::Application;
|
||||
use gtk::prelude::*;
|
||||
use tokio::io::{AsyncReadExt, AsyncWriteExt};
|
||||
use tokio::net::{UnixListener, UnixStream};
|
||||
use tokio::sync::mpsc::{self, Receiver, Sender};
|
||||
|
@ -15,7 +15,7 @@ use tracing::{debug, error, info, warn};
|
|||
|
||||
use crate::ipc::{Command, Response};
|
||||
use crate::style::load_css;
|
||||
use crate::{glib_recv_mpsc, send_async, spawn, try_send, Ironbar};
|
||||
use crate::{Ironbar, glib_recv_mpsc, send_async, spawn, try_send};
|
||||
|
||||
use super::Ipc;
|
||||
|
||||
|
@ -150,7 +150,7 @@ impl Ipc {
|
|||
}
|
||||
}
|
||||
Command::Var(cmd) => ironvar::handle_command(cmd),
|
||||
Command::Bar(cmd) => bar::handle_command(cmd, ironbar),
|
||||
Command::Bar(cmd) => bar::handle_command(&cmd, ironbar),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue