Run clippy fix

This commit is contained in:
Cameron
2026-01-14 13:17:58 -05:00
parent e9729e9956
commit e2d6cd7258
19 changed files with 123 additions and 158 deletions

View File

@@ -234,8 +234,8 @@ pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
(exif.gps_latitude, exif.gps_longitude)
{
let distance = haversine_distance(
lat as f64,
lon as f64,
lat,
lon,
photo_lat as f64,
photo_lon as f64,
);
@@ -344,7 +344,7 @@ pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
sort_type,
&mut exif_dao_guard,
&span_context,
(&app_state.base_path).as_ref(),
app_state.base_path.as_ref(),
);
drop(exif_dao_guard);
result
@@ -410,14 +410,9 @@ pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
)
})
.map(|path: &PathBuf| {
let relative = path.strip_prefix(&app_state.base_path).expect(
format!(
"Unable to strip base path {} from file path {}",
let relative = path.strip_prefix(&app_state.base_path).unwrap_or_else(|_| panic!("Unable to strip base path {} from file path {}",
&app_state.base_path.path(),
path.display()
)
.as_str(),
);
path.display()));
relative.to_path_buf()
})
.map(|f| f.to_str().unwrap().to_string())
@@ -493,7 +488,7 @@ pub async fn list_photos<TagD: TagDao, FS: FileSystemAccess>(
sort_type,
&mut exif_dao_guard,
&span_context,
(&app_state.base_path).as_ref(),
app_state.base_path.as_ref(),
);
drop(exif_dao_guard);
result