From 53015e116f5e520eca1f27528e75b80c3228e53a Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Wed, 14 Jul 2021 13:32:26 -0400 Subject: [PATCH] Renamed EncryptedDiskReader to EncryptedReader --- src/cache/fs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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<'_>,