From b938b0990139f71b0164dbda70e3d5157aa06d69 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 22 Dec 2023 20:54:02 -0600 Subject: [PATCH] Apply cargo fix --- src/discover/exiftool.rs | 1 - src/exiftool.rs | 1 - src/generate.rs | 4 ++-- src/generate/ffmpeg.rs | 1 - src/generate/magick.rs | 1 - src/magick.rs | 1 - src/process.rs | 14 ++++---------- src/validate.rs | 1 - src/validate/exiftool.rs | 1 - src/validate/ffmpeg.rs | 1 - src/validate/magick.rs | 3 +-- 11 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/discover/exiftool.rs b/src/discover/exiftool.rs index 0ef2d72..b8bba46 100644 --- a/src/discover/exiftool.rs +++ b/src/discover/exiftool.rs @@ -1,5 +1,4 @@ use actix_web::web::Bytes; -use tokio::io::AsyncReadExt; use crate::{ exiftool::ExifError, diff --git a/src/exiftool.rs b/src/exiftool.rs index a2d8ebd..2e6cf59 100644 --- a/src/exiftool.rs +++ b/src/exiftool.rs @@ -3,7 +3,6 @@ use crate::{ process::{Process, ProcessError, ProcessRead}, }; use actix_web::web::Bytes; -use tokio::io::{AsyncRead, AsyncReadExt}; #[derive(Debug, thiserror::Error)] pub(crate) enum ExifError { diff --git a/src/generate.rs b/src/generate.rs index 0d83862..bebf2e2 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -17,7 +17,7 @@ use std::{ sync::Arc, time::{Duration, Instant}, }; -use tokio::io::AsyncReadExt; + use tracing::Instrument; struct MetricsGuard { @@ -253,7 +253,7 @@ where }; let motion_identifier = reader - .with_stdout(|mut stdout| async { store.save_async_read(stdout, media_type).await }) + .with_stdout(|stdout| async { store.save_async_read(stdout, media_type).await }) .await??; repo.relate_motion_identifier(hash, &motion_identifier) diff --git a/src/generate/ffmpeg.rs b/src/generate/ffmpeg.rs index 8765d60..c90e029 100644 --- a/src/generate/ffmpeg.rs +++ b/src/generate/ffmpeg.rs @@ -6,7 +6,6 @@ use crate::{ ffmpeg::FfMpegError, formats::InternalVideoFormat, process::{Process, ProcessRead}, - read::BoxRead, store::Store, tmp_file::TmpDir, }; diff --git a/src/generate/magick.rs b/src/generate/magick.rs index e5aecf1..e745767 100644 --- a/src/generate/magick.rs +++ b/src/generate/magick.rs @@ -4,7 +4,6 @@ use crate::{ formats::ProcessableFormat, magick::{MagickError, MAGICK_TEMPORARY_PATH}, process::{Process, ProcessRead}, - read::BoxRead, store::Store, tmp_file::TmpDir, }; diff --git a/src/magick.rs b/src/magick.rs index 8fca68a..3ac47d1 100644 --- a/src/magick.rs +++ b/src/magick.rs @@ -4,7 +4,6 @@ use crate::{ error_code::ErrorCode, formats::ProcessableFormat, process::{Process, ProcessError, ProcessRead}, - read::BoxRead, store::Store, tmp_file::TmpDir, }; diff --git a/src/process.rs b/src/process.rs index f596023..53ae82b 100644 --- a/src/process.rs +++ b/src/process.rs @@ -3,24 +3,18 @@ use std::{ any::Any, ffi::OsStr, future::Future, - pin::Pin, process::{ExitStatus, Stdio}, - sync::{ - atomic::{AtomicU8, Ordering}, - Arc, Mutex, - }, - task::{Context, Poll, Wake, Waker}, + sync::Arc, time::{Duration, Instant}, }; use tokio::{ - io::{AsyncRead, AsyncReadExt, AsyncWriteExt, ReadBuf}, - process::{Child, ChildStdin, ChildStdout, Command}, + io::{AsyncReadExt, AsyncWriteExt}, + process::{Child, ChildStdin, Command}, }; -use tracing::{Instrument, Span}; +use tracing::Instrument; use uuid::Uuid; use crate::{ - error::Error, error_code::ErrorCode, future::{LocalBoxFuture, WithTimeout}, read::BoxRead, diff --git a/src/validate.rs b/src/validate.rs index 2ff57ca..f53a610 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -11,7 +11,6 @@ use crate::{ InternalFormat, Validations, }, process::ProcessRead, - read::BoxRead, tmp_file::TmpDir, }; use actix_web::web::Bytes; diff --git a/src/validate/exiftool.rs b/src/validate/exiftool.rs index 7c468cf..b97d5f0 100644 --- a/src/validate/exiftool.rs +++ b/src/validate/exiftool.rs @@ -3,7 +3,6 @@ use actix_web::web::Bytes; use crate::{ exiftool::ExifError, process::{Process, ProcessRead}, - read::BoxRead, }; #[tracing::instrument(level = "trace", skip_all)] diff --git a/src/validate/ffmpeg.rs b/src/validate/ffmpeg.rs index ed0ac47..eafa6a5 100644 --- a/src/validate/ffmpeg.rs +++ b/src/validate/ffmpeg.rs @@ -7,7 +7,6 @@ use crate::{ ffmpeg::FfMpegError, formats::{InputVideoFormat, OutputVideo}, process::{Process, ProcessRead}, - read::BoxRead, tmp_file::TmpDir, }; diff --git a/src/validate/magick.rs b/src/validate/magick.rs index c6201fb..7cc8384 100644 --- a/src/validate/magick.rs +++ b/src/validate/magick.rs @@ -6,8 +6,7 @@ use crate::{ formats::{AnimationFormat, ImageFormat}, magick::{MagickError, MAGICK_TEMPORARY_PATH}, process::{Process, ProcessRead}, - read::BoxRead, - tmp_file::{TmpDir, TmpFile, TmpFolder}, + tmp_file::TmpDir, }; pub(super) async fn convert_image(