From ea70fdc2d1c525c0e4bd586ef8395d4578a1ccc7 Mon Sep 17 00:00:00 2001 From: Avril Date: Fri, 13 Aug 2021 16:10:40 +0100 Subject: [PATCH] Fix failing tests of buffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix incorrect buffer feature checks Fortune for chacha20stream's current commit: Future small blessing − 末小吉 --- src/stream/sink.rs | 2 +- src/stream/source.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream/sink.rs b/src/stream/sink.rs index baa124e..50383af 100644 --- a/src/stream/sink.rs +++ b/src/stream/sink.rs @@ -39,7 +39,7 @@ use super::*; pub struct Sink { crypter: Crypter, // for chacha, finalize does nothing it seems. we can also call it multiple times. - buffer: BufferVec, // used to buffer the operation + pub(super) buffer: BufferVec, // used to buffer the operation stream: W, } diff --git a/src/stream/source.rs b/src/stream/source.rs index 37c3641..384418f 100644 --- a/src/stream/source.rs +++ b/src/stream/source.rs @@ -110,7 +110,7 @@ pub type DefaultBuffer = UseBufferExternal; pub struct Source { crypter: Crypter, - buffer: Buffer::InternalBuffer, // When `ad-hoc-buffer` is enabled, this isn't needed. We re-use the output buffer for the initial read of untransformed data from `stream` and the actual transformation of the read bytes. + pub(super) buffer: Buffer::InternalBuffer, // When `ad-hoc-buffer` is enabled, this isn't needed. We re-use the output buffer for the initial read of untransformed data from `stream` and the actual transformation of the read bytes. stream: R }