summaryrefslogtreecommitdiffstats
path: root/tokio/src/io
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2020-07-24 14:00:27 +0900
committerGitHub <noreply@github.com>2020-07-23 22:00:27 -0700
commit7a60a0b362337c9986a8d8bf59f458691685bf3e (patch)
treeab49f337fbb417bda6d87518cb815cf80d8a8b64 /tokio/src/io
parent94b64cd70d936cfc96fbb2a3289c3f02cd163be6 (diff)
io: always re-export std::io (#2606)
Diffstat (limited to 'tokio/src/io')
-rw-r--r--tokio/src/io/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/tokio/src/io/mod.rs b/tokio/src/io/mod.rs
index 7e91defd..9e0e0631 100644
--- a/tokio/src/io/mod.rs
+++ b/tokio/src/io/mod.rs
@@ -162,8 +162,8 @@
//!
//! # `std` re-exports
//!
-//! Additionally, [`Error`], [`ErrorKind`], and [`Result`] are re-exported
-//! from `std::io` for ease of use.
+//! Additionally, [`Error`], [`ErrorKind`], [`Result`], and [`SeekFrom`] are
+//! re-exported from `std::io` for ease of use.
//!
//! [`AsyncRead`]: trait@AsyncRead
//! [`AsyncWrite`]: trait@AsyncWrite
@@ -176,6 +176,7 @@
//! [`ErrorKind`]: enum@ErrorKind
//! [`Result`]: type@Result
//! [`Read`]: std::io::Read
+//! [`SeekFrom`]: enum@SeekFrom
//! [`Sink`]: https://docs.rs/futures/0.3/futures/sink/trait.Sink.html
//! [`Stream`]: crate::stream::Stream
//! [`Write`]: std::io::Write
@@ -187,7 +188,6 @@ mod async_buf_read;
pub use self::async_buf_read::AsyncBufRead;
mod async_read;
-
pub use self::async_read::AsyncRead;
mod async_seek;
@@ -196,6 +196,10 @@ pub use self::async_seek::AsyncSeek;
mod async_write;
pub use self::async_write::AsyncWrite;
+// Re-export some types from `std::io` so that users don't have to deal
+// with conflicts when `use`ing `tokio::io` and `std::io`.
+pub use std::io::{Error, ErrorKind, Result, SeekFrom};
+
cfg_io_driver! {
pub(crate) mod driver;
@@ -233,10 +237,6 @@ cfg_io_util! {
cfg_stream! {
pub use util::{stream_reader, StreamReader};
}
-
- // Re-export io::Error so that users don't have to deal with conflicts when
- // `use`ing `tokio::io` and `std::io`.
- pub use std::io::{Error, ErrorKind, Result};
}
cfg_not_io_util! {