From ba245611466cdfbd3ad9492d372ac1f81d31c787 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 20 Jun 2022 00:57:53 -0700 Subject: [PATCH] Export `BufReadExt` and `SeekExt` from `async_std::io` `async_std::io` exports `Read`, `ReadExt`, `Write`, `WriteExt`, `BufRead`, and `Seek`. But it does not export `BufReadExt` and `SeekExt`; those only appear in `async_std::io::prelude`. Export both `BufReadExt` and `SeekExt` from `async_std::io`. This makes it easier for code not using the prelude to import all of the I/O traits it uses from the same module. --- src/io/buf_read/mod.rs | 2 +- src/io/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/buf_read/mod.rs b/src/io/buf_read/mod.rs index 75247a51..bcb9d907 100644 --- a/src/io/buf_read/mod.rs +++ b/src/io/buf_read/mod.rs @@ -239,7 +239,7 @@ pub trait BufReadExt: BufRead { impl BufReadExt for T {} -pub fn read_until_internal( +pub(crate) fn read_until_internal( mut reader: Pin<&mut R>, cx: &mut Context<'_>, byte: u8, diff --git a/src/io/mod.rs b/src/io/mod.rs index e20ed800..8a415eb7 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -275,7 +275,7 @@ cfg_std! { #[doc(inline)] pub use std::io::{Error, ErrorKind, IoSlice, IoSliceMut, Result, SeekFrom}; - pub use buf_read::{BufRead, Lines, Split}; + pub use buf_read::*; pub use buf_reader::BufReader; pub use buf_writer::{BufWriter, IntoInnerError}; pub use copy::copy; @@ -283,7 +283,7 @@ cfg_std! { pub use empty::{empty, Empty}; pub use read::*; pub use repeat::{repeat, Repeat}; - pub use seek::Seek; + pub use seek::*; pub use sink::{sink, Sink}; pub use write::*;