5 Commits

Author SHA1 Message Date
Nick Cameron
a3c30e440a std::io: Modify some ReadBuf method signatures to return &mut Self
This allows using `ReadBuf` in a builder-like style and to setup a `ReadBuf` and
pass it to `read_buf` in a single expression, e.g.,

```
// With this PR:
reader.read_buf(ReadBuf::uninit(buf).assume_init(init_len))?;

// Previously:
let mut buf = ReadBuf::uninit(buf);
buf.assume_init(init_len);
reader.read_buf(&mut buf)?;
```

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-05-03 17:52:52 +01:00
Hiroshi Kori
7a3a668bc9 fix typo: intialized -> initialized 2021-12-26 18:37:11 -08:00
DrMeepster
cd23799ba5
correct typo
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-12-07 22:09:14 -08:00
DrMeepster
0d8fd23a31 implement review suggestions 2021-11-02 22:47:28 -07:00
DrMeepster
98c6200b16 read_buf 2021-11-02 22:47:20 -07:00