2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 03:11:24 +00:00

cargo fix & cargo fmt

This commit is contained in:
asonix 2024-02-03 18:19:14 -06:00
parent 50e31f96da
commit 7eba45f37e
15 changed files with 9 additions and 34 deletions

View file

@ -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};

View file

@ -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 {

View file

@ -11,7 +11,6 @@ use crate::{
},
process::Process,
state::State,
tmp_file::TmpDir,
};
use actix_web::web::Bytes;

View file

@ -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;

View file

@ -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::{

View file

@ -8,7 +8,6 @@ use crate::{
process::{Process, ProcessRead},
state::State,
store::Store,
tmp_file::TmpDir,
};
#[derive(Clone, Copy, Debug)]

View file

@ -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<S, F, Fut>(

View file

@ -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};

View file

@ -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;

View file

@ -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)]

View file

@ -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,

View file

@ -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};

View file

@ -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";

View file

@ -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;

View file

@ -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<S>(