Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
style(cap-test): use inline format strings in test suites
Richie McIlroy8d61420e4911
diff --git a/crates/cap-test/src/suites/encoding.rs b/crates/cap-test/src/suites/encoding.rsindex 74cf40734..3c021fadf 100644--- a/crates/cap-test/src/suites/encoding.rs+++ b/crates/cap-test/src/suites/encoding.rs@@ -34,8 +34,8 @@ pub async fn run_suite(hardware: &DiscoveredHardware, duration: u64) -> Result<T};let mut result = TestResult::new(- format!("encoding-{}-{}fps", label, fps),- format!("Encoding {} @{}fps", label, fps),+ format!("encoding-{label}-{fps}fps"),+ format!("Encoding {label} @{fps}fps"),test_config,);diff --git a/crates/cap-test/src/suites/performance.rs b/crates/cap-test/src/suites/performance.rsindex 0d291199f..5dad8669e 100644--- a/crates/cap-test/src/suites/performance.rs+++ b/crates/cap-test/src/suites/performance.rs@@ -223,8 +223,7 @@ async fn run_open_test(recording_path: &Path) -> TestResult {));} else if setup_secs > MAX_OPEN_TIME_SECS {result.set_failed(&format!(- "Fixture open exceeded {:.1}s ({setup_secs:.2}s)",- MAX_OPEN_TIME_SECS+ "Fixture open exceeded {MAX_OPEN_TIME_SECS:.1}s ({setup_secs:.2}s)"));}@@ -374,8 +373,7 @@ async fn run_export_test(recording_path: &Path) -> TestResult {result.set_failed("Export never reported frame progress");} else if metrics.first_progress_secs.unwrap_or_default() > MAX_EXPORT_START_SECS {result.set_failed(&format!(- "Export did not start within {:.1}s",- MAX_EXPORT_START_SECS+ "Export did not start within {MAX_EXPORT_START_SECS:.1}s"));} else if metrics.effective_fps < min_export_fps {result.set_failed(&format!(diff --git a/crates/cap-test/src/suites/playback.rs b/crates/cap-test/src/suites/playback.rsindex 4764c0e50..652c83b0b 100644--- a/crates/cap-test/src/suites/playback.rs+++ b/crates/cap-test/src/suites/playback.rs@@ -32,8 +32,8 @@ pub async fn run_suite(hardware: &DiscoveredHardware, duration: u64) -> Result<T};let mut result = TestResult::new(- format!("playback-{}", label),- format!("Playback {}", label),+ format!("playback-{label}"),+ format!("Playback {label}"),test_config,);diff --git a/crates/cap-test/src/suites/validate.rs b/crates/cap-test/src/suites/validate.rsindex c07b0c741..12758d569 100644--- a/crates/cap-test/src/suites/validate.rs+++ b/crates/cap-test/src/suites/validate.rs@@ -139,8 +139,7 @@ fn validate_dash_display_dirs(if m4s_count > 0 {total_duration = m4s_count as f64 * 3.0;warnings.push(format!(- "Estimated duration from {} m4s segments (no m3u8 found)",- m4s_count+ "Estimated duration from {m4s_count} m4s segments (no m3u8 found)"));}}@@ -460,7 +459,7 @@ async fn validate_video_file(let probe = match run_ffprobe(path) {Ok(p) => p,Err(e) => {- errors.push(format!("Failed to probe file: {}", e));+ errors.push(format!("Failed to probe file: {e}"));return Ok((None, None, None, errors, warnings));}};