summaryrefslogtreecommitdiffstats
path: root/tokio/tests/io_read.rs
AgeCommit message (Collapse)Author
2020-10-21io: add `AsyncReadExt::read_buf` (#3003)Carl Lerche
Brings back `read_buf` from 0.2. This will be stabilized as part of 1.0.
2020-10-12io: Rename `ReadBuf` methods (#2945)Lucio Franco
This changes `ReadBuf::add_filled` to `ReadBuf::advance` and `ReadBuf::append` to `ReadBuf::put_slice`. This is just a mechanical change. Closes #2769
2020-08-13io: change AsyncRead to use a ReadBuf (#2758)Sean McArthur
Works towards #2716. Changes the argument to `AsyncRead::poll_read` to take a `ReadBuf` struct that safely manages writes to uninitialized memory.
2020-01-21fix: Prevent undefined behaviour from malicious AsyncRead impl (#2030)Markus Westerlind
`AsyncRead` is safe to implement but can be implemented so that it reports that it read more bytes than it actually did. `poll_read_buf` on the other head implicitly trusts that the returned length is actually correct which makes it possible to advance the buffer past what has actually been initialized. An alternative fix could be to avoid the panic and instead advance by `n.min(b.len())`
2019-11-22default all feature flags to off (#1811)Carl Lerche
Changes the set of `default` feature flags to `[]`. By default, only core traits are included without specifying feature flags. This makes it easier for users to pick the components they need. For convenience, a `full` feature flag is included that includes all components. Tests are configured to require the `full` feature. Testing individual feature flags will need to be moved to a separate crate. Closes #1791
2019-10-26io: move into `tokio` crate (#1691)Carl Lerche
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The `io` implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
2019-08-02io: move io helpers back into `tokio-io` (#1377)Lucio Franco
Utilities are made optional with a feature flag.
2019-06-27chore: format code and enable rustfmt CI task (#1212)Carl Lerche
2019-06-26tokio: rewrite io_read.rs test to use async/await (#1207)Carl Lerche
This simplifies the test
2019-06-26tokio: move I/O helpers to ext traits (#1204)Carl Lerche
Refs: #1203