hls: cargo fmt + clippy::cloned_ref_to_slice_refs
Pure mechanical pass on the files this branch added/modified: rustfmt reflow of a few long lines / chains, and the one non-pre-existing clippy warning — replacing `&[rel_path.clone()]` with `std::slice::from_ref(&rel_path)` in `handlers::video::generate_video` to avoid the alloc + clone for a single-element slice. All 707 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -256,15 +256,14 @@ pub async fn hls_stats_handler(
|
||||
|
||||
// Synchronous file IO + DB query — run on a blocking pool so the
|
||||
// actix worker thread stays free for other requests.
|
||||
let stats = match web::block(move || compute_and_publish(&libraries, &exif_dao, &video_dir))
|
||||
.await
|
||||
{
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
warn!("/hls/stats: blocking task failed: {:?}", e);
|
||||
Vec::new()
|
||||
}
|
||||
};
|
||||
let stats =
|
||||
match web::block(move || compute_and_publish(&libraries, &exif_dao, &video_dir)).await {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
warn!("/hls/stats: blocking task failed: {:?}", e);
|
||||
Vec::new()
|
||||
}
|
||||
};
|
||||
|
||||
let total: usize = stats.iter().map(|s| s.total).sum();
|
||||
let with_playlist: usize = stats.iter().map(|s| s.with_playlist).sum();
|
||||
|
||||
Reference in New Issue
Block a user