about summary refs log tree commit diff
path: root/src/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/media')
-rw-r--r--src/media/storage/file.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/media/storage/file.rs b/src/media/storage/file.rs
index 7250a6b..b9ab541 100644
--- a/src/media/storage/file.rs
+++ b/src/media/storage/file.rs
@@ -4,7 +4,7 @@ use std::{path::PathBuf, fmt::Debug};
 use tokio::fs::OpenOptions;
 use tokio::io::{BufReader, BufWriter, AsyncWriteExt, AsyncSeekExt};
 use futures::{StreamExt, TryStreamExt};
-use std::ops::{Bound, RangeBounds, Neg};
+use std::ops::{Bound, Neg};
 use std::pin::Pin;
 use sha2::Digest;
 use futures::FutureExt;
@@ -73,7 +73,7 @@ impl MediaStore for FileStore {
                     let chunk = chunk.clone();
                     let tempfile = &mut tempfile;
                     async move {
-                        tempfile.write_all(&*chunk).await
+                        tempfile.write_all(&chunk).await
                     }
                 },
                 {
@@ -102,7 +102,7 @@ impl MediaStore for FileStore {
         tempfile.into_inner().sync_all().await?;
 
         let hash = hasher.finalize();
-        debug!("Pending upload hash: {}", hex::encode(&hash));
+        debug!("Pending upload hash: {}", hex::encode(hash));
         let filename = format!(
             "{}/{}/{}/{}/{}",
             hex::encode([hash[0]]),
@@ -117,7 +117,7 @@ impl MediaStore for FileStore {
         let metapath = self.base.join(domain_str.as_str()).join(&metafilename);
         let metatemppath = self.base.join(domain_str.as_str()).join(metafilename + ".tmp");
         metadata.length = std::num::NonZeroUsize::new(length);
-        metadata.etag = Some(hex::encode(&hash));
+        metadata.etag = Some(hex::encode(hash));
         debug!("File path: {}, metadata: {}", filepath.display(), metapath.display());
         {
             let parent = filepath.parent().unwrap();