Commit Graph
4 Commits
Author SHA1 Message Date
Sean McArthur cdd9fc09cd Export public the combinator types (#318) 2019-11-25 10:47:37 -08:00
Sean McArthur 44fb206148 add BufMutExt::limit (#309)
This type is the counterpart to BufExt::take. It limits how many bytes
some `BufMut` can actually be filled with.
2019-11-20 15:10:30 -08:00
Carl Lerche 8135c1f606 implicitly grow BytesMut; add BufMutExt::chain_mut (#316)
This brings `BytesMut` in line with `Vec<u8>` behavior.

This also fixes an existing bug in BytesMut::bytes_mut that exposes
invalid slices. The bug was recently introduced and was only on master
and never released to `crates.io`.

In order to fix a test, `BufMutExt::chain_mut` is provided. Withou this,
it is not possible to chain two `&mut [u8]`.

Closes #170
2019-11-20 12:11:40 -08:00
Sean McArthur 96268a80d4 Move "extra" methods to extension traits (#306) 2019-10-31 09:39:58 -07:00