async-rs / async-rs/async-std

BufRead::fill_buf() is missing

Open
#763 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

I'm trying to read binary data from a `Read` with `BufReader`, but there is no `BufRead::fill_buf()` function, only `BufRead::poll_fill_buf()`. Looking back at the history, it seems the original `fill_buf()` was removed in commit edfa2358a42872af35024dd83e78ea80e8fe6a4a, by @stjepang (_"Re-export IO traits from futures"_ for version 0.99.7).

From the 0.99.7 release notes: _"io traits are now re-exports of futures-rs types, allowing them to be implemented"_; but that doesn't seem to imply any such removals, so is there something I'm missing?

For now I'm (trying to) implement my own future type for this, but do I need to / should I have to?
Any help would be greatly appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.