Skip to content

feat: impl std::io::Write for SliceDeque<u8> - #84

Open
ErichDonGubler wants to merge 3 commits into
gnzlbg:masterfrom
ErichDonGubler:impl-std_io_write
Open

ErichDonGubler wants to merge 3 commits into
gnzlbg:masterfrom
ErichDonGubler:impl-std_io_write

Conversation

@ErichDonGubler

Copy link
Copy Markdown

I haven't seen any discussion about this on this repo -- I've tried to do my homework, but I realize that this PR is out of the blue and hope that it's welcome. :) It should be a small commitment to review this, though, since the diff is small!

I've run into a case supporting some projects for vivint-smarthome where having std::io::Write would be particularly helpful for interoperation with compression crates like flate2.

This particular implementation comes straight from std's implementation for Vec<u8>. That means that the correctness of the implementation will just depend on SliceDeque::{extend_from_slice,reserve} having the same semantics as their counterparts in Vec<u8>, which I believe is the case.

@ErichDonGubler
ErichDonGubler requested a review from gnzlbg February 3, 2020 21:00
@ErichDonGubler

Copy link
Copy Markdown
Author

Hmm, there are some failures in CI that are concerning to me as a user but I don't think have to do with this PR, since they also happen on master in Travis. In no particular order:

  • Not having an unstable feature (which seems to still be used in src/) causes failures on just about everything. Adding unstable = [] to [features] in Cargo.toml fixes over half of the builds for individual platforms, which I have added as a commit here. I can break it out though if you prefer.
  • The next-largest number of issues comes from having clippy fail, looks like from new lint(s) that came with 1.41. Other builds are running Clippy despite having a dedicated job?
  • Various other failures, haven't taken the time to enumerate them yet.

@ErichDonGubler

Copy link
Copy Markdown
Author

@gnzlbg, ping!

@zyansheep

Copy link
Copy Markdown

This would indeed be nice to have, (I need it too!) however, I think the owner of this repo is not active on github anymore... does anyone know any alternatives to this crate?

@Boscop

Boscop commented Apr 16, 2023

Copy link
Copy Markdown

@zyansheep Yes, this fork: https://github.com/LiquidityC/slice_ring_buffer

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.

3 participants