diff --git a/src/cache/fs.rs b/src/cache/fs.rs index ba6ba72..498fc29 100644 --- a/src/cache/fs.rs +++ b/src/cache/fs.rs @@ -104,7 +104,7 @@ async fn read_file( debug!("header bytes: {:x?}", nonce_bytes); maybe_header = Some(*XNonce::from_slice(&nonce_bytes)); - reader = Some(Box::pin(BufReader::new(EncryptedDiskReader::new( + reader = Some(Box::pin(BufReader::new(EncryptedReader::new( file, XNonce::from_slice(XNonce::from_slice(&nonce_bytes)), key, @@ -138,12 +138,12 @@ async fn read_file( } } -struct EncryptedDiskReader { +struct EncryptedReader { file: Pin>, keystream: XChaCha20, } -impl EncryptedDiskReader { +impl EncryptedReader { fn new(file: R, nonce: &XNonce, key: &Key) -> Self { Self { file: Box::pin(file), @@ -165,7 +165,7 @@ impl MetadataFetch for R { } } -impl AsyncRead for EncryptedDiskReader { +impl AsyncRead for EncryptedReader { fn poll_read( mut self: Pin<&mut Self>, cx: &mut Context<'_>,