Skip to content

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jan 20, 2023

The wording around Write::write method is changing with requirement
that it maps to ‘at most one write’ being removed¹. With that, change
EncoderWriter::write so that it flushes entire output buffer at the
beginning and then proceeds to process new input. This eliminates
returning Ok(0) which is effectively an error.

Also, change accounting for the occupied portion of the output buffer.
Rather than just having occupied length, track occupied range which
means moving data to front is no longer necessary.

¹ rust-lang/rust#107200

@mina86 mina86 changed the title Use [T]::copy_within in EncoderWriter i/o [T]::rotate_left EncoderWriter: no longer adhere to ‘at most one write’ Feb 1, 2023
@mina86 mina86 force-pushed the b branch 3 times, most recently from 26c8049 to 38882eb Compare February 2, 2023 01:14
The wording around Write::write method is changing with requirement
that it maps to ‘at most one write’ being removed¹.  With that, change
EncoderWriter::write so that it flushes entire output buffer at the
beginning and then proceeds to process new input.  This eliminates
returning Ok(0) which is effectively an error.

Also, change accounting for the occupied portion of the output buffer.
Rather than just having occupied length, track occupied range which
means moving data to front is no longer necessary.

¹ rust-lang/rust#107200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant