From 6194848b0eef941c9a2aea8670f3080273cb9c03 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 1 Dec 2025 00:11:23 -0300 Subject: [PATCH] client: addressed warning in build --- client/src/input/camera.rs | 1 + client/src/input/inputs.rs | 6 ------ client/src/input/microphone.rs | 1 + client/src/input/mouse.rs | 5 +++-- client/src/main.rs | 6 ++++-- client/src/output/video.rs | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/client/src/input/camera.rs b/client/src/input/camera.rs index 6783050..ab59bb7 100644 --- a/client/src/input/camera.rs +++ b/client/src/input/camera.rs @@ -8,6 +8,7 @@ use gst::prelude::*; use lesavka_common::lesavka::VideoPacket; pub struct CameraCapture { + #[allow(dead_code)] // kept alive to hold PLAYING state pipeline: gst::Pipeline, sink: gst_app::AppSink, } diff --git a/client/src/input/inputs.rs b/client/src/input/inputs.rs index 100272c..d3a3346 100644 --- a/client/src/input/inputs.rs +++ b/client/src/input/inputs.rs @@ -145,12 +145,6 @@ impl InputAggregator { } } -#[derive(Debug)] -struct Classification { - keyboard: Option<()>, - mouse: Option<()>, -} - /// The classification function fn classify_device(dev: &Device) -> DeviceKind { let evbits = dev.supported_events(); diff --git a/client/src/input/microphone.rs b/client/src/input/microphone.rs index 27d2441..7e9f733 100644 --- a/client/src/input/microphone.rs +++ b/client/src/input/microphone.rs @@ -12,6 +12,7 @@ use shell_escape::unix::escape; use std::sync::atomic::{AtomicU64, Ordering}; pub struct MicrophoneCapture { + #[allow(dead_code)] // kept alive to hold PLAYING state pipeline: gst::Pipeline, sink: gst_app::AppSink, } diff --git a/client/src/input/mouse.rs b/client/src/input/mouse.rs index 9c2b3be..1757dec 100644 --- a/client/src/input/mouse.rs +++ b/client/src/input/mouse.rs @@ -28,7 +28,9 @@ impl MouseAggregator { Self { dev, tx, dev_mode, sending_disabled: false, next_send: Instant::now(), buttons:0, last_buttons:0, dx:0, dy:0, wheel:0 } } - #[inline] fn slog(&self, f: impl FnOnce()) { if self.dev_mode { f() } } + #[inline] + #[allow(dead_code)] + fn slog(&self, f: impl FnOnce()) { if self.dev_mode { f() } } pub fn set_grab(&mut self, grab: bool) { let _ = if grab { self.dev.grab() } else { self.dev.ungrab() }; } @@ -108,4 +110,3 @@ impl Drop for MouseAggregator { }); } } - diff --git a/client/src/main.rs b/client/src/main.rs index 7b885a0..280cdcc 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -27,8 +27,10 @@ async fn main() -> Result<()> { if env::var_os("WAYLAND_DISPLAY").is_some() { if let Some(desktop) = env::var_os("XDG_CURRENT_DESKTOP") { if desktop.to_string_lossy().to_ascii_lowercase().contains("kde") { - env::set_var("GDK_BACKEND", "x11"); - env::set_var("WINIT_UNIX_BACKEND", "x11"); + unsafe { + env::set_var("GDK_BACKEND", "x11"); + env::set_var("WINIT_UNIX_BACKEND", "x11"); + } } } } diff --git a/client/src/output/video.rs b/client/src/output/video.rs index e3d1714..0722aa2 100644 --- a/client/src/output/video.rs +++ b/client/src/output/video.rs @@ -68,7 +68,7 @@ impl MonitorWindow { if let Ok(overlay) = sink_elem.dynamic_cast::() { if let Some(r) = rects.get(id as usize) { // 1. Tell glimagesink how to crop the texture in its own window - overlay.set_render_rectangle(r.x, r.y, r.w, r.h); + let _ = overlay.set_render_rectangle(r.x, r.y, r.w, r.h); debug!( "🔲 eye-{id} → render_rectangle({}, {}, {}, {})", r.x, r.y, r.w, r.h