diff --git a/src/details.rs b/src/details.rs index c2fd9fc..f95c828 100644 --- a/src/details.rs +++ b/src/details.rs @@ -2,10 +2,8 @@ use crate::{ discover::Discovery, error::Error, formats::{InternalFormat, InternalVideoFormat}, - magick::PolicyDir, serde_str::Serde, state::State, - tmp_file::TmpDir, }; use actix_web::web; use time::{format_description::well_known::Rfc3339, OffsetDateTime}; diff --git a/src/discover.rs b/src/discover.rs index 005f76e..f394c52 100644 --- a/src/discover.rs +++ b/src/discover.rs @@ -4,7 +4,7 @@ mod magick; use actix_web::web::Bytes; -use crate::{formats::InputFile, magick::PolicyDir, state::State, tmp_file::TmpDir}; +use crate::{formats::InputFile, state::State}; #[derive(Debug, PartialEq, Eq)] pub(crate) struct Discovery { diff --git a/src/discover/ffmpeg.rs b/src/discover/ffmpeg.rs index 004870e..1597b05 100644 --- a/src/discover/ffmpeg.rs +++ b/src/discover/ffmpeg.rs @@ -11,7 +11,6 @@ use crate::{ }, process::Process, state::State, - tmp_file::TmpDir, }; use actix_web::web::Bytes; diff --git a/src/discover/magick.rs b/src/discover/magick.rs index 92e458b..a280736 100644 --- a/src/discover/magick.rs +++ b/src/discover/magick.rs @@ -6,10 +6,9 @@ use actix_web::web::Bytes; use crate::{ discover::DiscoverError, formats::{AnimationFormat, ImageFormat, ImageInput, InputFile}, - magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, + magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, process::Process, state::State, - tmp_file::TmpDir, }; use super::Discovery; diff --git a/src/generate.rs b/src/generate.rs index ee5f2f2..75966c5 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -7,11 +7,9 @@ use crate::{ error::{Error, UploadError}, formats::{ImageFormat, InputProcessableFormat, InternalVideoFormat, ProcessableFormat}, future::{WithMetrics, WithTimeout}, - magick::PolicyDir, repo::{Hash, VariantAlreadyExists}, state::State, store::Store, - tmp_file::TmpDir, }; use actix_web::web::Bytes; use std::{ diff --git a/src/generate/ffmpeg.rs b/src/generate/ffmpeg.rs index aec518d..39976be 100644 --- a/src/generate/ffmpeg.rs +++ b/src/generate/ffmpeg.rs @@ -8,7 +8,6 @@ use crate::{ process::{Process, ProcessRead}, state::State, store::Store, - tmp_file::TmpDir, }; #[derive(Clone, Copy, Debug)] diff --git a/src/generate/magick.rs b/src/generate/magick.rs index 3b03a2a..b753261 100644 --- a/src/generate/magick.rs +++ b/src/generate/magick.rs @@ -4,11 +4,10 @@ use actix_web::web::Bytes; use crate::{ formats::{ImageFormat, ProcessableFormat}, - magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, + magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, process::{Process, ProcessRead}, state::State, stream::LocalBoxStream, - tmp_file::TmpDir, }; async fn thumbnail_animation( diff --git a/src/ingest.rs b/src/ingest.rs index 12bcf2b..a952305 100644 --- a/src/ingest.rs +++ b/src/ingest.rs @@ -4,18 +4,16 @@ use crate::{ bytes_stream::BytesStream, details::Details, error::{Error, UploadError}, - formats::{InternalFormat, Validations}, + formats::InternalFormat, future::WithMetrics, - magick::PolicyDir, repo::{Alias, ArcRepo, DeleteToken, Hash}, state::State, store::Store, - tmp_file::TmpDir, }; use actix_web::web::Bytes; use futures_core::Stream; use reqwest::Body; -use reqwest_middleware::ClientWithMiddleware; + use streem::IntoStreamer; use tracing::{Instrument, Span}; diff --git a/src/lib.rs b/src/lib.rs index 277c9b2..798e384 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,7 @@ use actix_web::{ use details::{ApiDetails, HumanDate}; use future::WithTimeout; use futures_core::Stream; -use magick::{ArcPolicyDir, PolicyDir}; +use magick::ArcPolicyDir; use metrics_exporter_prometheus::PrometheusBuilder; use middleware::{Metrics, Payload}; use repo::ArcRepo; diff --git a/src/migrate_store.rs b/src/migrate_store.rs index c420e88..9bd3cd8 100644 --- a/src/migrate_store.rs +++ b/src/migrate_store.rs @@ -12,11 +12,9 @@ use streem::IntoStreamer; use crate::{ details::Details, error::{Error, UploadError}, - magick::{ArcPolicyDir, PolicyDir}, repo::{ArcRepo, Hash}, state::State, store::Store, - tmp_file::{ArcTmpDir, TmpDir}, }; #[allow(clippy::too_many_arguments)] diff --git a/src/queue.rs b/src/queue.rs index 9227709..c58b1b8 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -1,17 +1,14 @@ use crate::{ concurrent_processor::ProcessMap, - config::Configuration, error::{Error, UploadError}, formats::InputProcessableFormat, future::LocalBoxFuture, - magick::ArcPolicyDir, repo::{Alias, ArcRepo, DeleteToken, Hash, JobId, UploadId}, serde_str::Serde, state::State, store::Store, - tmp_file::ArcTmpDir, }; -use reqwest_middleware::ClientWithMiddleware; + use std::{ path::PathBuf, sync::Arc, diff --git a/src/queue/process.rs b/src/queue/process.rs index bdef92a..656e2c9 100644 --- a/src/queue/process.rs +++ b/src/queue/process.rs @@ -1,21 +1,17 @@ -use reqwest_middleware::ClientWithMiddleware; use time::Instant; use tracing::{Instrument, Span}; use crate::{ concurrent_processor::ProcessMap, - config::Configuration, error::{Error, UploadError}, formats::InputProcessableFormat, future::LocalBoxFuture, ingest::Session, - magick::{ArcPolicyDir, PolicyDir}, queue::Process, - repo::{Alias, ArcRepo, UploadId, UploadResult}, + repo::{Alias, UploadId, UploadResult}, serde_str::Serde, state::State, store::Store, - tmp_file::{ArcTmpDir, TmpDir}, }; use std::{path::PathBuf, sync::Arc}; diff --git a/src/repo/migrate.rs b/src/repo/migrate.rs index f2b6efa..9cc803f 100644 --- a/src/repo/migrate.rs +++ b/src/repo/migrate.rs @@ -7,10 +7,8 @@ use streem::IntoStreamer; use tokio::{sync::Semaphore, task::JoinSet}; use crate::{ - config::Configuration, details::Details, error::{Error, UploadError}, - magick::{ArcPolicyDir, PolicyDir}, repo::{ArcRepo, DeleteToken, Hash}, repo_04::{ AliasRepo as _, HashRepo as _, IdentifierRepo as _, SettingsRepo as _, @@ -18,7 +16,6 @@ use crate::{ }, state::State, store::Store, - tmp_file::{ArcTmpDir, TmpDir}, }; const GENERATOR_KEY: &str = "last-path"; diff --git a/src/validate.rs b/src/validate.rs index e4a6f29..b69b5df 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -10,10 +10,8 @@ use crate::{ AnimationFormat, AnimationOutput, ImageInput, ImageOutput, InputFile, InputVideoFormat, InternalFormat, }, - magick::PolicyDir, process::ProcessRead, state::State, - tmp_file::TmpDir, }; use actix_web::web::Bytes; diff --git a/src/validate/magick.rs b/src/validate/magick.rs index 65fa367..ac8b720 100644 --- a/src/validate/magick.rs +++ b/src/validate/magick.rs @@ -4,10 +4,9 @@ use actix_web::web::Bytes; use crate::{ formats::{AnimationFormat, ImageFormat}, - magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, + magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH}, process::{Process, ProcessRead}, state::State, - tmp_file::TmpDir, }; pub(super) async fn convert_image(