diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a2f5ccd..bc2452b 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -37,3 +37,8 @@ ashpd = "0.7" [features] default = ["custom-protocol"] custom-protocol = ["tauri/custom-protocol"] + +[lints.rust] +# The `objc` crate's msg_send! macro expands to a `cfg(cargo-clippy)` check; +# declare it as a known cfg so it doesn't trip the unexpected_cfgs lint. +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(cargo-clippy)'] } diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index ecf6a0e..1e51169 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -4,6 +4,9 @@ use tauri::{Emitter, Manager}; #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] +// include_audio/system_audio are part of the frontend wire contract but only +// used by the recording path, not by still capture — keep them, don't warn. +#[allow(dead_code)] pub struct CaptureOptions { pub format: Option, pub quality: Option, @@ -35,6 +38,9 @@ pub struct Rectangle { #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] +// video_bitrate/audio_bitrate are accepted from the frontend but not yet +// threaded into the encoder — reserved config, keep without warning. +#[allow(dead_code)] pub struct RecordOptions { pub format: Option, pub video_bitrate: Option, @@ -82,8 +88,8 @@ pub fn capture_screen_fast(display_id: Option, fps: u32, bounds: Option, fps: u32, bounds: Option) -> Result, String> { #[cfg(target_os = "macos")] { diff --git a/src-tauri/src/overlay.rs b/src-tauri/src/overlay.rs index 73450a6..1fde4ca 100644 --- a/src-tauri/src/overlay.rs +++ b/src-tauri/src/overlay.rs @@ -1,14 +1,5 @@ // src-tauri/src/overlay.rs use tauri::{AppHandle, Emitter, LogicalPosition, LogicalSize, Manager, WebviewUrl, WebviewWindowBuilder}; -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct Rectangle { - pub x: i32, - pub y: i32, - pub width: u32, - pub height: u32, -} /// Pre-create the region-selector overlay window, hidden, at app startup. /// diff --git a/src-tauri/src/recording.rs b/src-tauri/src/recording.rs index b04739d..f179fff 100644 --- a/src-tauri/src/recording.rs +++ b/src-tauri/src/recording.rs @@ -7,7 +7,6 @@ use std::time::{Duration, Instant}; use std::process::Command; use std::fs::{self, File}; use std::io::Write; -use std::path::PathBuf; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] @@ -29,6 +28,9 @@ pub struct RecordingHandle { pub format: Option, } +// Several fields snapshot the request for diagnostics/future use; the live +// recording thread reads the Arc-shared ones. Keep them without warning. +#[allow(dead_code)] struct RecordingState { handle: RecordingHandle, fps: u32,