Skip to content

Commit d74ff90

Browse files
radicalkjaxclaude
andcommitted
fix(rust): resolve clippy format string and unused import warnings
- Make Deserialize import conditional for macOS only - Use inline format string variables instead of positional args 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d7a7e40 commit d74ff90

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src-tauri/src/services/ffmpeg_downloader.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ use std::sync::Arc;
88

99
use futures_util::StreamExt;
1010
use reqwest::Client;
11-
use serde::{Deserialize, Serialize};
11+
use serde::Serialize;
12+
#[cfg(target_os = "macos")]
13+
use serde::Deserialize;
1214
use tauri::{AppHandle, Emitter, Manager};
1315
use crate::services::SettingsManager;
1416
use thiserror::Error;
@@ -669,10 +671,10 @@ exit /b %errorlevel%
669671
if !settings.ffmpeg_path.is_empty() {
670672
let custom_path = PathBuf::from(&settings.ffmpeg_path);
671673
if custom_path.exists() {
672-
log::debug!("Using custom FFmpeg path from settings: {:?}", custom_path);
674+
log::debug!("Using custom FFmpeg path from settings: {custom_path:?}");
673675
return Some(custom_path);
674676
} else {
675-
log::warn!("Custom FFmpeg path in settings does not exist: {:?}", custom_path);
677+
log::warn!("Custom FFmpeg path in settings does not exist: {custom_path:?}");
676678
}
677679
}
678680
}
@@ -681,7 +683,7 @@ exit /b %errorlevel%
681683
// Fall back to system install location
682684
let system_path = Self::get_system_install_path();
683685
if system_path.exists() {
684-
log::debug!("Using system FFmpeg path: {:?}", system_path);
686+
log::debug!("Using system FFmpeg path: {system_path:?}");
685687
Some(system_path)
686688
} else {
687689
None
@@ -841,11 +843,11 @@ exit /b %errorlevel%
841843
};
842844

843845
let status = match (&installed_version, &latest, update_available) {
844-
(Some(v), _, false) => format!("FFmpeg {} is up to date", v),
845-
(Some(v), Some(l), true) => format!("Update available: {} → {}", v, l),
846-
(None, Some(l), _) => format!("FFmpeg not installed (latest: {})", l),
846+
(Some(v), _, false) => format!("FFmpeg {v} is up to date"),
847+
(Some(v), Some(l), true) => format!("Update available: {v} → {l}"),
848+
(None, Some(l), _) => format!("FFmpeg not installed (latest: {l})"),
847849
(None, None, _) => "FFmpeg not installed".to_string(),
848-
(Some(v), None, _) => format!("FFmpeg {} installed (unable to check for updates)", v),
850+
(Some(v), None, _) => format!("FFmpeg {v} installed (unable to check for updates)"),
849851
};
850852

851853
FFmpegVersionInfo {

0 commit comments

Comments
 (0)