Fix failing tests of buffer.

Fix incorrect buffer feature checks

Fortune for chacha20stream's current commit: Future small blessing − 末小吉
read-stream-wrapper
Avril 3 years ago
parent 907862f554
commit ea70fdc2d1
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -39,7 +39,7 @@ use super::*;
pub struct Sink<W: ?Sized>
{
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,
}

@ -110,7 +110,7 @@ pub type DefaultBuffer = UseBufferExternal;
pub struct Source<R: ?Sized, Buffer: ?Sized + BufferKind = DefaultBuffer>
{
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
}

Loading…
Cancel
Save