clippy-fixes
Some checks failed
Deploy / deploy (push) Has been skipped
CI / lint (push) Failing after 1m53s
CI / test (push) Failing after 1m58s

This commit is contained in:
2025-08-12 14:13:35 +03:00
parent a4c2825f8a
commit 31053db4a2
10 changed files with 23 additions and 42 deletions

View File

@@ -37,7 +37,7 @@ pub async fn proxy_handler(
let mut redis = state.redis.clone();
match find_file_by_pattern(&mut redis, &base_filename).await {
Ok(Some(found_file)) => {
if let Some(found_ext) = found_file.split('.').last() {
if let Some(found_ext) = found_file.split('.').next_back() {
get_mime_type(found_ext)
.unwrap_or("application/octet-stream")
.to_string()
@@ -80,7 +80,7 @@ pub async fn proxy_handler(
warn!("Serving original file without resizing");
serve_file(&stored_path, &state, shout_id).await
} else {
let closest: u32 = find_closest_width(requested_width as u32);
let closest: u32 = find_closest_width(requested_width);
warn!(
"Calculated closest width: {} for requested: {}",
closest, requested_width