mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-03 00:00:05 +02:00
io: add missing utility functions (#1632)
The standard library's `io` module has small utilities such as `repeat`, `empty`, and `sink`, which return `Read` and `Write` implementations. These can come in handy in some circiumstances. `tokio::io` has no equivalents that implement `AsyncRead`/`AsyncWrite`. This commit adds `repeat`, `empty`, and `sink` helpers to `tokio::io`.
This commit is contained in:
committed by
Carl Lerche
parent
ab2f71a612
commit
8aa520e2bd
+2
-2
@@ -41,8 +41,8 @@
|
||||
pub use tokio_fs::{stderr, stdin, stdout, Stderr, Stdin, Stdout};
|
||||
pub use tokio_io::split::split;
|
||||
pub use tokio_io::{
|
||||
AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, BufReader,
|
||||
BufWriter,
|
||||
empty, repeat, sink, AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite,
|
||||
AsyncWriteExt, BufReader, BufWriter, Empty, Repeat, Sink,
|
||||
};
|
||||
|
||||
// Re-export io::Error so that users don't have to deal
|
||||
|
||||
Reference in New Issue
Block a user