Add sync restriction on CacheStream
This commit is contained in:
parent
54c8fe1cb3
commit
b41ae8cb79
2 changed files with 2 additions and 2 deletions
2
src/cache/fs.rs
vendored
2
src/cache/fs.rs
vendored
|
@ -65,7 +65,7 @@ pub(super) async fn read_file(
|
|||
|
||||
let parsed_metadata;
|
||||
let mut maybe_header = None;
|
||||
let mut reader: Option<Pin<Box<dyn MetadataFetch + Send>>> = None;
|
||||
let mut reader: Option<Pin<Box<dyn MetadataFetch + Send + Sync>>> = None;
|
||||
if let Ok(metadata) = maybe_metadata {
|
||||
// image is decrypted
|
||||
if ENCRYPTION_KEY.get().is_some() {
|
||||
|
|
2
src/cache/mod.rs
vendored
2
src/cache/mod.rs
vendored
|
@ -241,7 +241,7 @@ pub struct CacheEntry {
|
|||
|
||||
pub enum CacheStream {
|
||||
Memory(MemStream),
|
||||
Completed(FramedRead<Pin<Box<dyn MetadataFetch + Send>>, BytesCodec>),
|
||||
Completed(FramedRead<Pin<Box<dyn MetadataFetch + Send + Sync>>, BytesCodec>),
|
||||
}
|
||||
|
||||
impl From<CachedImage> for CacheStream {
|
||||
|
|
Loading…
Reference in a new issue