diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-10 15:28:36 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-10 15:28:36 +0200 |
commit | 05d11426a8e60fa060733eb8ae7843bc2ae9725c (patch) | |
tree | 57cfad9cedf1eb50de193f1657b42234745c044e /transcoder/src/thumbnail.rs | |
parent | c0365c8c64f403fd9ee75c0db1a9ed6134633e8f (diff) | |
download | jellything-05d11426a8e60fa060733eb8ae7843bc2ae9725c.tar jellything-05d11426a8e60fa060733eb8ae7843bc2ae9725c.tar.bz2 jellything-05d11426a8e60fa060733eb8ae7843bc2ae9725c.tar.zst |
apply many clippy issue
Diffstat (limited to 'transcoder/src/thumbnail.rs')
-rw-r--r-- | transcoder/src/thumbnail.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/transcoder/src/thumbnail.rs b/transcoder/src/thumbnail.rs index 9661fd0..c8bfb1c 100644 --- a/transcoder/src/thumbnail.rs +++ b/transcoder/src/thumbnail.rs @@ -5,7 +5,7 @@ use std::{path::Path, process::Stdio}; use tokio::{io::copy, process::Command}; pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePath> { - Ok(async_cache_file( + async_cache_file( &["thumb", path.to_str().unwrap(), &format!("{time}")], move |mut output| async move { let _permit = LOCAL_IMAGE_TRANSCODING_TASKS.acquire().await?; @@ -13,12 +13,12 @@ pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePat let mut proc = Command::new("ffmpeg") .stdout(Stdio::piped()) - .args(&["-ss", &format!("{time}")]) - .args(&["-f", "matroska", "-i", path.to_str().unwrap()]) - .args(&["-frames:v", "1"]) - .args(&["-c:v", "qoi"]) - .args(&["-f", "image2"]) - .args(&["-update", "1"]) + .args(["-ss", &format!("{time}")]) + .args(["-f", "matroska", "-i", path.to_str().unwrap()]) + .args(["-frames:v", "1"]) + .args(["-c:v", "qoi"]) + .args(["-f", "image2"]) + .args(["-update", "1"]) .arg("pipe:1") .spawn()?; @@ -30,5 +30,5 @@ pub async fn create_thumbnail(path: &Path, time: f64) -> anyhow::Result<CachePat Ok(()) }, ) - .await?) + .await } |