mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
cargo fix & cargo fmt
This commit is contained in:
parent
50e31f96da
commit
7eba45f37e
15 changed files with 9 additions and 34 deletions
|
@ -2,10 +2,8 @@ use crate::{
|
||||||
discover::Discovery,
|
discover::Discovery,
|
||||||
error::Error,
|
error::Error,
|
||||||
formats::{InternalFormat, InternalVideoFormat},
|
formats::{InternalFormat, InternalVideoFormat},
|
||||||
magick::PolicyDir,
|
|
||||||
serde_str::Serde,
|
serde_str::Serde,
|
||||||
state::State,
|
state::State,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
use actix_web::web;
|
use actix_web::web;
|
||||||
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
||||||
|
|
|
@ -4,7 +4,7 @@ mod magick;
|
||||||
|
|
||||||
use actix_web::web::Bytes;
|
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)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub(crate) struct Discovery {
|
pub(crate) struct Discovery {
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::{
|
||||||
},
|
},
|
||||||
process::Process,
|
process::Process,
|
||||||
state::State,
|
state::State,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
use actix_web::web::Bytes;
|
use actix_web::web::Bytes;
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,9 @@ use actix_web::web::Bytes;
|
||||||
use crate::{
|
use crate::{
|
||||||
discover::DiscoverError,
|
discover::DiscoverError,
|
||||||
formats::{AnimationFormat, ImageFormat, ImageInput, InputFile},
|
formats::{AnimationFormat, ImageFormat, ImageInput, InputFile},
|
||||||
magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
||||||
process::Process,
|
process::Process,
|
||||||
state::State,
|
state::State,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::Discovery;
|
use super::Discovery;
|
||||||
|
|
|
@ -7,11 +7,9 @@ use crate::{
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
formats::{ImageFormat, InputProcessableFormat, InternalVideoFormat, ProcessableFormat},
|
formats::{ImageFormat, InputProcessableFormat, InternalVideoFormat, ProcessableFormat},
|
||||||
future::{WithMetrics, WithTimeout},
|
future::{WithMetrics, WithTimeout},
|
||||||
magick::PolicyDir,
|
|
||||||
repo::{Hash, VariantAlreadyExists},
|
repo::{Hash, VariantAlreadyExists},
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
use actix_web::web::Bytes;
|
use actix_web::web::Bytes;
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::{
|
||||||
process::{Process, ProcessRead},
|
process::{Process, ProcessRead},
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
|
|
|
@ -4,11 +4,10 @@ use actix_web::web::Bytes;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
formats::{ImageFormat, ProcessableFormat},
|
formats::{ImageFormat, ProcessableFormat},
|
||||||
magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
||||||
process::{Process, ProcessRead},
|
process::{Process, ProcessRead},
|
||||||
state::State,
|
state::State,
|
||||||
stream::LocalBoxStream,
|
stream::LocalBoxStream,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
async fn thumbnail_animation<S, F, Fut>(
|
async fn thumbnail_animation<S, F, Fut>(
|
||||||
|
|
|
@ -4,18 +4,16 @@ use crate::{
|
||||||
bytes_stream::BytesStream,
|
bytes_stream::BytesStream,
|
||||||
details::Details,
|
details::Details,
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
formats::{InternalFormat, Validations},
|
formats::InternalFormat,
|
||||||
future::WithMetrics,
|
future::WithMetrics,
|
||||||
magick::PolicyDir,
|
|
||||||
repo::{Alias, ArcRepo, DeleteToken, Hash},
|
repo::{Alias, ArcRepo, DeleteToken, Hash},
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
use actix_web::web::Bytes;
|
use actix_web::web::Bytes;
|
||||||
use futures_core::Stream;
|
use futures_core::Stream;
|
||||||
use reqwest::Body;
|
use reqwest::Body;
|
||||||
use reqwest_middleware::ClientWithMiddleware;
|
|
||||||
use streem::IntoStreamer;
|
use streem::IntoStreamer;
|
||||||
use tracing::{Instrument, Span};
|
use tracing::{Instrument, Span};
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ use actix_web::{
|
||||||
use details::{ApiDetails, HumanDate};
|
use details::{ApiDetails, HumanDate};
|
||||||
use future::WithTimeout;
|
use future::WithTimeout;
|
||||||
use futures_core::Stream;
|
use futures_core::Stream;
|
||||||
use magick::{ArcPolicyDir, PolicyDir};
|
use magick::ArcPolicyDir;
|
||||||
use metrics_exporter_prometheus::PrometheusBuilder;
|
use metrics_exporter_prometheus::PrometheusBuilder;
|
||||||
use middleware::{Metrics, Payload};
|
use middleware::{Metrics, Payload};
|
||||||
use repo::ArcRepo;
|
use repo::ArcRepo;
|
||||||
|
|
|
@ -12,11 +12,9 @@ use streem::IntoStreamer;
|
||||||
use crate::{
|
use crate::{
|
||||||
details::Details,
|
details::Details,
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
magick::{ArcPolicyDir, PolicyDir},
|
|
||||||
repo::{ArcRepo, Hash},
|
repo::{ArcRepo, Hash},
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::{ArcTmpDir, TmpDir},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
concurrent_processor::ProcessMap,
|
concurrent_processor::ProcessMap,
|
||||||
config::Configuration,
|
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
formats::InputProcessableFormat,
|
formats::InputProcessableFormat,
|
||||||
future::LocalBoxFuture,
|
future::LocalBoxFuture,
|
||||||
magick::ArcPolicyDir,
|
|
||||||
repo::{Alias, ArcRepo, DeleteToken, Hash, JobId, UploadId},
|
repo::{Alias, ArcRepo, DeleteToken, Hash, JobId, UploadId},
|
||||||
serde_str::Serde,
|
serde_str::Serde,
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::ArcTmpDir,
|
|
||||||
};
|
};
|
||||||
use reqwest_middleware::ClientWithMiddleware;
|
|
||||||
use std::{
|
use std::{
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
use reqwest_middleware::ClientWithMiddleware;
|
|
||||||
use time::Instant;
|
use time::Instant;
|
||||||
use tracing::{Instrument, Span};
|
use tracing::{Instrument, Span};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
concurrent_processor::ProcessMap,
|
concurrent_processor::ProcessMap,
|
||||||
config::Configuration,
|
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
formats::InputProcessableFormat,
|
formats::InputProcessableFormat,
|
||||||
future::LocalBoxFuture,
|
future::LocalBoxFuture,
|
||||||
ingest::Session,
|
ingest::Session,
|
||||||
magick::{ArcPolicyDir, PolicyDir},
|
|
||||||
queue::Process,
|
queue::Process,
|
||||||
repo::{Alias, ArcRepo, UploadId, UploadResult},
|
repo::{Alias, UploadId, UploadResult},
|
||||||
serde_str::Serde,
|
serde_str::Serde,
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::{ArcTmpDir, TmpDir},
|
|
||||||
};
|
};
|
||||||
use std::{path::PathBuf, sync::Arc};
|
use std::{path::PathBuf, sync::Arc};
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,8 @@ use streem::IntoStreamer;
|
||||||
use tokio::{sync::Semaphore, task::JoinSet};
|
use tokio::{sync::Semaphore, task::JoinSet};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Configuration,
|
|
||||||
details::Details,
|
details::Details,
|
||||||
error::{Error, UploadError},
|
error::{Error, UploadError},
|
||||||
magick::{ArcPolicyDir, PolicyDir},
|
|
||||||
repo::{ArcRepo, DeleteToken, Hash},
|
repo::{ArcRepo, DeleteToken, Hash},
|
||||||
repo_04::{
|
repo_04::{
|
||||||
AliasRepo as _, HashRepo as _, IdentifierRepo as _, SettingsRepo as _,
|
AliasRepo as _, HashRepo as _, IdentifierRepo as _, SettingsRepo as _,
|
||||||
|
@ -18,7 +16,6 @@ use crate::{
|
||||||
},
|
},
|
||||||
state::State,
|
state::State,
|
||||||
store::Store,
|
store::Store,
|
||||||
tmp_file::{ArcTmpDir, TmpDir},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const GENERATOR_KEY: &str = "last-path";
|
const GENERATOR_KEY: &str = "last-path";
|
||||||
|
|
|
@ -10,10 +10,8 @@ use crate::{
|
||||||
AnimationFormat, AnimationOutput, ImageInput, ImageOutput, InputFile, InputVideoFormat,
|
AnimationFormat, AnimationOutput, ImageInput, ImageOutput, InputFile, InputVideoFormat,
|
||||||
InternalFormat,
|
InternalFormat,
|
||||||
},
|
},
|
||||||
magick::PolicyDir,
|
|
||||||
process::ProcessRead,
|
process::ProcessRead,
|
||||||
state::State,
|
state::State,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
use actix_web::web::Bytes;
|
use actix_web::web::Bytes;
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,9 @@ use actix_web::web::Bytes;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
formats::{AnimationFormat, ImageFormat},
|
formats::{AnimationFormat, ImageFormat},
|
||||||
magick::{MagickError, PolicyDir, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
magick::{MagickError, MAGICK_CONFIGURE_PATH, MAGICK_TEMPORARY_PATH},
|
||||||
process::{Process, ProcessRead},
|
process::{Process, ProcessRead},
|
||||||
state::State,
|
state::State,
|
||||||
tmp_file::TmpDir,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) async fn convert_image<S>(
|
pub(super) async fn convert_image<S>(
|
||||||
|
|
Loading…
Reference in a new issue