diff --git a/src/backend.rs b/src/backend.rs index 272ef35..3b66479 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -204,7 +204,7 @@ impl DmabufHandler for State { .map_err(|_| ()), }; - if let Ok(_) = res { + if res.is_ok() { let _ = notifier.successful::(); } else { notifier.failed(); diff --git a/src/backend/udev.rs b/src/backend/udev.rs index 4308038..441cda1 100644 --- a/src/backend/udev.rs +++ b/src/backend/udev.rs @@ -3,7 +3,6 @@ use std::{ collections::{HashMap, HashSet}, ffi::OsString, - os::fd::FromRawFd, path::Path, time::Duration, }; @@ -243,7 +242,7 @@ pub fn run_udev() -> anyhow::Result<()> { let (session, notifier) = LibSeatSession::new()?; // Get the primary gpu - let primary_gpu = udev::primary_gpu(&session.seat()) + let primary_gpu = udev::primary_gpu(session.seat()) .context("unable to get primary gpu path")? .and_then(|x| { DrmNode::from_path(x) diff --git a/src/layout.rs b/src/layout.rs index 82d7fda..45e1b9f 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -258,8 +258,6 @@ fn master_stack(windows: Vec, rect: Rectangle) { let new_master_size: Size = (size.w / 2, size.h).into(); master.change_geometry(Rectangle::from_loc_and_size(loc, new_master_size)); - let stack_count = stack_count; - let height = size.h as f32 / stack_count as f32; let mut y_s = vec![]; for i in 0..stack_count {