about summary refs log tree commit diff
path: root/kittybox-rs/src/media/storage/mod.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-07-14 05:46:42 +0300
committerVika <vika@fireburn.ru>2022-07-14 05:46:42 +0300
commit2c509e85429c70b528a73d7a57a3c080fb8b06bf (patch)
treec6fea95434cd0cec50017a246dc384362439cf3c /kittybox-rs/src/media/storage/mod.rs
parentd8556f4eb27412f60fa48b73b18db0e52d388409 (diff)
downloadkittybox-2c509e85429c70b528a73d7a57a3c080fb8b06bf.tar.zst
media: buffer disk I/O and add debug logging
It looks like buffering reads can double my performance. Nice.
Diffstat (limited to 'kittybox-rs/src/media/storage/mod.rs')
-rw-r--r--kittybox-rs/src/media/storage/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/kittybox-rs/src/media/storage/mod.rs b/kittybox-rs/src/media/storage/mod.rs
index cb8b38f..5614437 100644
--- a/kittybox-rs/src/media/storage/mod.rs
+++ b/kittybox-rs/src/media/storage/mod.rs
@@ -4,6 +4,7 @@ use tokio_stream::Stream;
 use bytes::Bytes;
 use serde::{Deserialize, Serialize};
 use std::pin::Pin;
+use std::fmt::Debug;
 
 pub mod file;
 
@@ -86,7 +87,7 @@ pub trait MediaStore: 'static + Send + Sync + Clone {
         content: T,
     ) -> Result<String>
     where
-        T: tokio_stream::Stream<Item = std::result::Result<bytes::Bytes, axum::extract::multipart::MultipartError>> + Unpin + Send;
+        T: tokio_stream::Stream<Item = std::result::Result<bytes::Bytes, axum::extract::multipart::MultipartError>> + Unpin + Send + Debug;
 
     async fn read_streaming(
         &self,