From eabd7ea228b00a03278af675a70b5f2d9ba9da68 Mon Sep 17 00:00:00 2001 From: asonix Date: Sat, 24 Feb 2024 13:21:35 -0600 Subject: [PATCH] Delete unused functions --- src/discover/exiftool.rs | 2 -- src/exiftool.rs | 27 +-------------------------- src/validate/exiftool.rs | 4 +--- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/discover/exiftool.rs b/src/discover/exiftool.rs index 2549827..69b237d 100644 --- a/src/discover/exiftool.rs +++ b/src/discover/exiftool.rs @@ -1,5 +1,3 @@ - - use crate::{ bytes_stream::BytesStream, exiftool::ExifError, diff --git a/src/exiftool.rs b/src/exiftool.rs index 027b53b..2db938d 100644 --- a/src/exiftool.rs +++ b/src/exiftool.rs @@ -1,9 +1,4 @@ -use crate::{ - bytes_stream::BytesStream, - error_code::ErrorCode, - process::{Process, ProcessError, ProcessRead}, -}; - +use crate::{error_code::ErrorCode, process::ProcessError}; #[derive(Debug, thiserror::Error)] pub(crate) enum ExifError { @@ -38,23 +33,3 @@ impl ExifError { } } } - -#[tracing::instrument(level = "trace", skip(input))] -pub(crate) async fn needs_reorienting(timeout: u64, input: BytesStream) -> Result { - let buf = Process::run("exiftool", &["-n", "-Orientation", "-"], &[], timeout)? - .bytes_stream_read(input) - .into_string() - .await?; - - Ok(!buf.is_empty()) -} - -#[tracing::instrument(level = "trace", skip(input))] -pub(crate) fn clear_metadata_bytes_read( - timeout: u64, - input: BytesStream, -) -> Result { - let process = Process::run("exiftool", &["-all=", "-", "-out", "-"], &[], timeout)?; - - Ok(process.bytes_stream_read(input)) -} diff --git a/src/validate/exiftool.rs b/src/validate/exiftool.rs index 2705c11..2c6ba4a 100644 --- a/src/validate/exiftool.rs +++ b/src/validate/exiftool.rs @@ -1,5 +1,3 @@ - - use crate::{ bytes_stream::BytesStream, exiftool::ExifError, @@ -7,7 +5,7 @@ use crate::{ }; #[tracing::instrument(level = "trace", skip_all)] -pub(crate) fn clear_metadata_bytes_read( +pub(super) fn clear_metadata_bytes_read( input: BytesStream, timeout: u64, ) -> Result {