bytes icon indicating copy to clipboard operation
bytes copied to clipboard

Implement Buf for std::io::Take<&[u8]>.

Open smarnach opened this issue 5 years ago • 2 comments

I stumbled upon https://github.com/rust-lang/rust/issues/27269 and noticed that it is fixed now, so I added an implementation. The implementation only covers Take<&[u8]>, but I can't think of any more general type this could be implemented for.

smarnach avatar Sep 30 '18 10:09 smarnach

The build fails for Rust 1.15, which does not yet have the new methods. So if this version of Rust still needs to be supported, we need to protect this by a feature flag, which probably isn't worth it.

smarnach avatar Oct 04 '18 10:10 smarnach

I will track this for the next breaking change 👍 Thanks.

carllerche avatar Oct 04 '18 17:10 carllerche