mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-01 01:59:58 +00:00
Delete unused functions
This commit is contained in:
parent
ad51e6cd9f
commit
eabd7ea228
3 changed files with 2 additions and 31 deletions
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
bytes_stream::BytesStream,
|
bytes_stream::BytesStream,
|
||||||
exiftool::ExifError,
|
exiftool::ExifError,
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
use crate::{
|
use crate::{error_code::ErrorCode, process::ProcessError};
|
||||||
bytes_stream::BytesStream,
|
|
||||||
error_code::ErrorCode,
|
|
||||||
process::{Process, ProcessError, ProcessRead},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub(crate) enum ExifError {
|
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<bool, ExifError> {
|
|
||||||
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<ProcessRead, ExifError> {
|
|
||||||
let process = Process::run("exiftool", &["-all=", "-", "-out", "-"], &[], timeout)?;
|
|
||||||
|
|
||||||
Ok(process.bytes_stream_read(input))
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
bytes_stream::BytesStream,
|
bytes_stream::BytesStream,
|
||||||
exiftool::ExifError,
|
exiftool::ExifError,
|
||||||
|
@ -7,7 +5,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tracing::instrument(level = "trace", skip_all)]
|
#[tracing::instrument(level = "trace", skip_all)]
|
||||||
pub(crate) fn clear_metadata_bytes_read(
|
pub(super) fn clear_metadata_bytes_read(
|
||||||
input: BytesStream,
|
input: BytesStream,
|
||||||
timeout: u64,
|
timeout: u64,
|
||||||
) -> Result<ProcessRead, ExifError> {
|
) -> Result<ProcessRead, ExifError> {
|
||||||
|
|
Loading…
Reference in a new issue