From c176e4c686da2945146f855dc9eff8cf6b512647 Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 3 Feb 2024 18:30:52 -0600 Subject: [PATCH] clippy --- src/generate.rs | 4 +--- src/ingest.rs | 1 - src/lib.rs | 3 --- src/migrate_store.rs | 3 --- src/queue.rs | 1 - src/queue/cleanup.rs | 6 +++--- 6 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/generate.rs b/src/generate.rs index 75966c5..42704fb 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -93,7 +93,6 @@ pub(crate) async fn generate( } } -#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip(state, hash))] async fn process( state: &State, @@ -167,7 +166,6 @@ async fn process( Ok((details, bytes)) as Result<(Details, Bytes), Error> } -#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip_all)] async fn input_identifier( state: &State, @@ -220,7 +218,7 @@ where }; let reader = ffmpeg::thumbnail( - &state, + state, identifier, original_details .video_format() diff --git a/src/ingest.rs b/src/ingest.rs index a952305..5c245ce 100644 --- a/src/ingest.rs +++ b/src/ingest.rs @@ -160,7 +160,6 @@ where Ok((input_type, identifier, details, hash_state)) } -#[allow(clippy::too_many_arguments)] #[tracing::instrument(skip(state, stream))] pub(crate) async fn ingest( state: &State, diff --git a/src/lib.rs b/src/lib.rs index 798e384..5983eb6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -773,7 +773,6 @@ async fn not_found_hash(repo: &ArcRepo) -> Result, Error> } /// Process files -#[allow(clippy::too_many_arguments)] #[tracing::instrument(name = "Serving processed image", skip(state, process_map))] async fn process( range: Option>, @@ -899,7 +898,6 @@ async fn process( )) } -#[allow(clippy::too_many_arguments)] #[tracing::instrument(name = "Serving processed image headers", skip(state))] async fn process_head( range: Option>, @@ -1042,7 +1040,6 @@ async fn details( } /// Serve files based on alias query -#[allow(clippy::too_many_arguments)] #[tracing::instrument(name = "Serving file query", skip(state))] async fn serve_query( range: Option>, diff --git a/src/migrate_store.rs b/src/migrate_store.rs index 9bd3cd8..0578bbe 100644 --- a/src/migrate_store.rs +++ b/src/migrate_store.rs @@ -17,7 +17,6 @@ use crate::{ store::Store, }; -#[allow(clippy::too_many_arguments)] pub(super) async fn migrate_store( from: S1, to: State, @@ -75,7 +74,6 @@ struct MigrateState { started_at: Instant, } -#[allow(clippy::too_many_arguments)] async fn do_migrate_store( from: S1, to: State, @@ -326,7 +324,6 @@ where Ok(()) } -#[allow(clippy::too_many_arguments)] async fn migrate_file( from: &S1, to: &State, diff --git a/src/queue.rs b/src/queue.rs index c58b1b8..95afe7b 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -330,7 +330,6 @@ async fn process_image_jobs( } } -#[allow(clippy::too_many_arguments)] async fn image_job_loop( state: &State, process_map: &ProcessMap, diff --git a/src/queue/cleanup.rs b/src/queue/cleanup.rs index 473b37c..6c432a3 100644 --- a/src/queue/cleanup.rs +++ b/src/queue/cleanup.rs @@ -14,10 +14,10 @@ use crate::{ store::Store, }; -pub(super) fn perform<'a, S>( - state: &'a State, +pub(super) fn perform( + state: &State, job: serde_json::Value, -) -> LocalBoxFuture<'a, Result<(), Error>> +) -> LocalBoxFuture<'_, Result<(), Error>> where S: Store + 'static, {