mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
refactor: remove dead code
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
use core::cmp::max;
|
use core::cmp::max;
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::fmt;
|
|
||||||
use std::io::{Cursor, Seek};
|
use std::io::{Cursor, Seek};
|
||||||
use std::iter::FusedIterator;
|
use std::iter::FusedIterator;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
@@ -693,7 +692,7 @@ fn file_hash(src: &Path) -> Result<blake3::Hash> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns image file size and Exif.
|
/// Returns image file size and Exif.
|
||||||
pub fn image_metadata(file: &std::fs::File) -> Result<(u64, Option<exif::Exif>)> {
|
fn image_metadata(file: &std::fs::File) -> Result<(u64, Option<exif::Exif>)> {
|
||||||
let len = file.metadata()?.len();
|
let len = file.metadata()?.len();
|
||||||
let mut bufreader = std::io::BufReader::new(file);
|
let mut bufreader = std::io::BufReader::new(file);
|
||||||
let exif = exif::Reader::new().read_from_container(&mut bufreader).ok();
|
let exif = exif::Reader::new().read_from_container(&mut bufreader).ok();
|
||||||
@@ -714,12 +713,6 @@ fn exif_orientation(exif: &exif::Exif, context: &Context) -> i32 {
|
|||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for BlobObject<'_> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
||||||
write!(f, "$BLOBDIR/{}", self.name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// All files in the blobdir.
|
/// All files in the blobdir.
|
||||||
///
|
///
|
||||||
/// This exists so we can have a [`BlobDirIter`] which needs something to own the data of
|
/// This exists so we can have a [`BlobDirIter`] which needs something to own the data of
|
||||||
|
|||||||
Reference in New Issue
Block a user