1
0
Fork 0
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:
Jake Stanger 2025-02-21 16:35:54 +00:00
commit 202c19efd4
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
57 changed files with 132 additions and 124 deletions

View file

@ -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 {

View file

@ -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);

View file

@ -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 {

View file

@ -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),
}
}