replace production unwraps with real handling

This commit is contained in:
2026-09-21 01:05:30 +03:00
parent 1ace31fc6e
commit 186337b7bb
2 changed files with 21 additions and 11 deletions
+8
View File
@@ -566,6 +566,10 @@ fn monitor_at_point(x: i32, y: i32) -> Result<Monitor> {
Ok(Monitor::from_raw_hmonitor(hmonitor.0))
}
#[allow(
clippy::expect_used,
reason = "Windows always has a primary monitor; if enumeration fails there is nothing sensible to capture instead"
)]
pub(crate) fn start(
output_path: PathBuf,
ffmpeg_path: PathBuf,
@@ -693,6 +697,10 @@ impl CaptureSession {
/// Idempotent: if `input` has already been consumed (e.g. a previous
/// pause/resume cycle ran this to completion and removed it), and
/// `output` exists, returns Ok without re-running ffmpeg.
#[allow(
clippy::expect_used,
reason = "callers rule out the None case that capture_timing returns None for"
)]
pub(crate) fn fix_intermediate_fps(
ffmpeg: &std::path::Path,
input: &std::path::Path,