fix: satisfy CI clippy lints

This commit is contained in:
2026-04-16 17:10:14 -04:00
parent b0646e2629
commit df771d3f7c
3 changed files with 15 additions and 17 deletions

View File

@@ -354,15 +354,15 @@ pub(crate) async fn batch_jobs_handler(
JobState::Queued => {
immediate_ids.push(job.id);
}
JobState::Analyzing | JobState::Resuming => {
if state.transcoder.cancel_job(job.id) {
immediate_ids.push(job.id);
}
JobState::Analyzing | JobState::Resuming
if state.transcoder.cancel_job(job.id) =>
{
immediate_ids.push(job.id);
}
JobState::Encoding | JobState::Remuxing => {
if state.transcoder.cancel_job(job.id) {
active_count += 1;
}
JobState::Encoding | JobState::Remuxing
if state.transcoder.cancel_job(job.id) =>
{
active_count += 1;
}
_ => {}
}

View File

@@ -461,14 +461,12 @@ fn normalize_notification_payload(
unreachable!("notification config_json should always be an object here");
};
match payload.target_type.as_str() {
"discord_webhook" | "discord" => {
if !config_map.contains_key("webhook_url") {
if let Some(endpoint_url) = payload.endpoint_url.as_ref() {
config_map.insert(
"webhook_url".to_string(),
JsonValue::String(endpoint_url.clone()),
);
}
"discord_webhook" | "discord" if !config_map.contains_key("webhook_url") => {
if let Some(endpoint_url) = payload.endpoint_url.as_ref() {
config_map.insert(
"webhook_url".to_string(),
JsonValue::String(endpoint_url.clone()),
);
}
}
"gotify" => {

View File

@@ -162,7 +162,7 @@ fn browse_blocking(path: &Path) -> Result<FsBrowseResponse> {
Vec::new()
};
entries.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase()));
entries.sort_by_key(|entry| entry.name.to_lowercase());
Ok(FsBrowseResponse {
path: path.to_string_lossy().to_string(),