chore(cargo): address clippy warnings

This commit is contained in:
LGUG2Z
2026-07-21 10:50:26 -07:00
parent ccb39abd2e
commit d29069398b
8 changed files with 16 additions and 30 deletions
Generated
+4 -16
View File
@@ -1351,7 +1351,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162"
dependencies = [
"dispatch2",
"nix 0.31.3",
"nix",
"windows-sys 0.61.2",
]
@@ -3909,18 +3909,6 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nix"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [
"bitflags 2.13.0",
"cfg-if 1.0.4",
"cfg_aliases",
"libc",
]
[[package]]
name = "nix"
version = "0.31.3"
@@ -4396,7 +4384,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"
dependencies = [
"bitflags 2.11.1",
"bitflags 2.13.0",
"block2 0.6.2",
"dispatch2",
"libc",
@@ -4693,7 +4681,7 @@ checksum = "9cf20a545b305cf1da722b236b5155c9bb35f1d5ceb28c048bd96ca842f41b5b"
dependencies = [
"android_system_properties",
"log",
"nix 0.31.3",
"nix",
"objc2 0.6.4",
"objc2-foundation 0.3.2",
"objc2-ui-kit 0.3.2",
@@ -6146,7 +6134,7 @@ dependencies = [
"lazycell",
"libc",
"mach2",
"nix 0.31.2",
"nix",
"num-traits",
"objc2-core-foundation",
"objc2-io-kit",
+4 -4
View File
@@ -50,7 +50,7 @@ impl SelectableFrame {
let visuals = ui.style().interact_selectable(&response, selected);
Frame::NONE
.stroke(Stroke::new(1.0, visuals.bg_stroke.color))
.stroke(Stroke::new(1.0_f32, visuals.bg_stroke.color))
.corner_radius(visuals.corner_radius)
.fill(selected_fill.unwrap_or(visuals.bg_fill))
.inner_margin(inner_margin)
@@ -59,7 +59,7 @@ impl SelectableFrame {
let visuals = ui.style().interact_selectable(&response, selected);
Frame::NONE
.stroke(Stroke::new(1.0, visuals.bg_stroke.color))
.stroke(Stroke::new(1.0_f32, visuals.bg_stroke.color))
.corner_radius(visuals.corner_radius)
.fill(visuals.bg_fill)
.inner_margin(inner_margin)
@@ -68,14 +68,14 @@ impl SelectableFrame {
let visuals = ui.style().interact_selectable(&response, selected);
Frame::NONE
.stroke(Stroke::new(1.0, visuals.bg_fill))
.stroke(Stroke::new(1.0_f32, visuals.bg_fill))
.corner_radius(visuals.corner_radius)
.fill(selected_fill.unwrap_or(visuals.bg_fill))
.inner_margin(inner_margin)
.show(ui, add_contents);
} else {
Frame::NONE
.stroke(Stroke::new(1.0, Color32::TRANSPARENT))
.stroke(Stroke::new(1.0_f32, Color32::TRANSPARENT))
.inner_margin(inner_margin)
.show(ui, add_contents);
}
+1 -1
View File
@@ -312,7 +312,7 @@ impl Icon {
#[inline]
pub fn draw_fallback(ui: &mut Ui, icon_size: Vec2) {
let (response, painter) = ui.allocate_painter(icon_size, Sense::hover());
let stroke = Stroke::new(1.0, ui.style().visuals.text_color());
let stroke = Stroke::new(1.0_f32, ui.style().visuals.text_color());
let mut rect = response.rect;
let rounding = CornerRadius::same((rect.width() * 0.1) as u8);
rect = rect.shrink(stroke.width);
+3 -3
View File
@@ -467,7 +467,7 @@ impl WorkspacesBar {
fn show_fallback_icon(&self, ctx: &Context, ui: &mut Ui, ws: &WorkspaceInfo) -> Response {
let (response, painter) = ui.allocate_painter(self.icon_size, Sense::hover());
let stroke: Stroke = Stroke::new(
1.0,
1.0_f32,
if ws.is_selected {
ctx.style().visuals.selection.stroke.color
} else {
@@ -629,7 +629,7 @@ impl WorkspaceLayerBar {
if matches!(layer, WorkspaceLayer::Tiling) {
let (response, painter) = ui.allocate_painter(size, Sense::hover());
let color = ctx.style().visuals.selection.stroke.color;
let stroke = Stroke::new(1.0, color);
let stroke = Stroke::new(1.0_f32, color);
let mut rect = response.rect;
let corner = CornerRadius::same((rect.width() * 0.1) as u8);
rect = rect.shrink(stroke.width);
@@ -652,7 +652,7 @@ impl WorkspaceLayerBar {
} else {
let (response, painter) = ui.allocate_painter(size, Sense::hover());
let color = ctx.style().visuals.selection.stroke.color;
let stroke = Stroke::new(1.0, color);
let stroke = Stroke::new(1.0_f32, color);
let mut rect = response.rect;
let corner = CornerRadius::same((rect.width() * 0.1) as u8);
rect = rect.shrink(stroke.width);
+1 -1
View File
@@ -148,7 +148,7 @@ impl KomorebiLayout {
} else {
ui.style().visuals.text_color()
};
let stroke = Stroke::new(1.0, color);
let stroke = Stroke::new(1.0_f32, color);
let mut rect = response.rect;
let rounding = CornerRadius::same((rect.width() * 0.1) as u8);
rect = rect.shrink(stroke.width);
+1 -1
View File
@@ -316,7 +316,7 @@ impl Time {
let (response, painter) =
ui.allocate_painter(Vec2::new(width, full_height + offset * 2.0), Sense::hover());
let color = ctx.style().visuals.text_color();
let stroke = Stroke::new(1.0, color);
let stroke = Stroke::new(1.0_f32, color);
let round_all = CornerRadius::same((response.rect.width() * 0.1) as u8);
let round_top = CornerRadius {
+1 -3
View File
@@ -3,7 +3,6 @@ use color_eyre::eyre::OptionExt;
use color_eyre::eyre::WrapErr;
use komorebi_themes::colour::Rgb;
use miow::pipe::connect;
use net2::TcpStreamExt;
use parking_lot::Mutex;
use std::collections::HashMap;
use std::fs::File;
@@ -154,8 +153,7 @@ pub fn listen_for_commands_tcp(wm: Arc<Mutex<WindowManager>>, port: usize) {
for client in listener.incoming() {
match client {
Ok(mut stream) => {
stream
.set_keepalive(Some(Duration::from_secs(30)))
net2::TcpStreamExt::set_keepalive(&stream, Some(Duration::from_secs(30)))
.expect("TCP keepalive should be set");
let addr = stream
+1 -1
View File
@@ -101,7 +101,7 @@ pub fn handle_notifications(wm: Arc<Mutex<WindowManager>>) -> color_eyre::Result
if matches!(STACKBAR_MODE.load(), StackbarMode::Never)
|| STACKBAR_TEMPORARILY_DISABLED.load(Ordering::SeqCst)
{
for (_, stackbar) in stackbars.iter() {
for stackbar in stackbars.values() {
stackbar.destroy()?;
}