summaryrefslogtreecommitdiffstats
path: root/tokio-util/src
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-10-26 08:02:49 -0700
committerGitHub <noreply@github.com>2019-10-26 08:02:49 -0700
commit987ba7373cf95c570bf23768c6021f7a7508286e (patch)
tree616c62a65cb6b0c7e4c3e31f92f01c8d4749b0c3 /tokio-util/src
parent227533d456fe32e48ffcd3796f1e6c8f9318b230 (diff)
io: move into `tokio` crate (#1691)
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.
Diffstat (limited to 'tokio-util/src')
-rw-r--r--tokio-util/src/codec/decoder.rs2
-rw-r--r--tokio-util/src/codec/framed.rs2
-rw-r--r--tokio-util/src/codec/framed_read.rs2
-rw-r--r--tokio-util/src/codec/framed_write.rs2
-rw-r--r--tokio-util/src/codec/length_delimited.rs42
5 files changed, 25 insertions, 25 deletions
diff --git a/tokio-util/src/codec/decoder.rs b/tokio-util/src/codec/decoder.rs
index 720e0b6e..dfe5f8ee 100644
--- a/tokio-util/src/codec/decoder.rs
+++ b/tokio-util/src/codec/decoder.rs
@@ -1,7 +1,7 @@
use crate::codec::encoder::Encoder;
use crate::codec::Framed;
-use tokio_io::{AsyncRead, AsyncWrite};
+use tokio::io::{AsyncRead, AsyncWrite};
use bytes::BytesMut;
use std::io;
diff --git a/tokio-util/src/codec/framed.rs b/tokio-util/src/codec/framed.rs
index e2eb82cb..8f2317f0 100644
--- a/tokio-util/src/codec/framed.rs
+++ b/tokio-util/src/codec/framed.rs
@@ -3,7 +3,7 @@ use crate::codec::encoder::Encoder;
use crate::codec::framed_read::{framed_read2, framed_read2_with_buffer, FramedRead2};
use crate::codec::framed_write::{framed_write2, framed_write2_with_buffer, FramedWrite2};
-use tokio_io::{AsyncBufRead, AsyncRead, AsyncWrite};
+use tokio::io::{AsyncBufRead, AsyncRead, AsyncWrite};
use bytes::BytesMut;
use futures_core::Stream;
diff --git a/tokio-util/src/codec/framed_read.rs b/tokio-util/src/codec/framed_read.rs
index 71f22150..6f79cb9a 100644
--- a/tokio-util/src/codec/framed_read.rs
+++ b/tokio-util/src/codec/framed_read.rs
@@ -1,7 +1,7 @@
use crate::codec::framed::Fuse;
use crate::codec::Decoder;
-use tokio_io::AsyncRead;
+use tokio::io::AsyncRead;
use bytes::BytesMut;
use futures_core::Stream;
diff --git a/tokio-util/src/codec/framed_write.rs b/tokio-util/src/codec/framed_write.rs
index fa8aba17..3a95612c 100644
--- a/tokio-util/src/codec/framed_write.rs
+++ b/tokio-util/src/codec/framed_write.rs
@@ -2,7 +2,7 @@ use crate::codec::decoder::Decoder;
use crate::codec::encoder::Encoder;
use crate::codec::framed::Fuse;
-use tokio_io::{AsyncBufRead, AsyncRead, AsyncWrite};
+use tokio::io::{AsyncBufRead, AsyncRead, AsyncWrite};
use bytes::BytesMut;
use futures_core::{ready, Stream};
diff --git a/tokio-util/src/codec/length_delimited.rs b/tokio-util/src/codec/length_delimited.rs
index 579417a2..df07466e 100644
--- a/tokio-util/src/codec/length_delimited.rs
+++ b/tokio-util/src/codec/length_delimited.rs
@@ -15,7 +15,7 @@
//! byte stream into a stream of frames.
//!
//! ```
-//! use tokio_io::{AsyncRead, AsyncWrite};
+//! use tokio::io::{AsyncRead, AsyncWrite};
//! use tokio_util::codec::{Framed, LengthDelimitedCodec};
//!
//! fn bind_transport<T: AsyncRead + AsyncWrite>(io: T)
@@ -78,7 +78,7 @@
//! frame head in the yielded `BytesMut`.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -112,7 +112,7 @@
//! frame head in the yielded `BytesMut`.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -144,7 +144,7 @@
//! **includes** the frame head length.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -178,7 +178,7 @@
//! frame head, including the frame head in the yielded `BytesMut`.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -222,7 +222,7 @@
//! included.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -268,7 +268,7 @@
//! length.
//!
//! ```
-//! # use tokio_io::AsyncRead;
+//! # use tokio::io::AsyncRead;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn bind_read<T: AsyncRead>(io: T) {
//! LengthDelimitedCodec::builder()
@@ -313,7 +313,7 @@
//! configuration:
//!
//! ```
-//! # use tokio_io::AsyncWrite;
+//! # use tokio::io::AsyncWrite;
//! # use tokio_util::codec::LengthDelimitedCodec;
//! # fn write_frame<T: AsyncWrite>(io: T) {
//! # let _ =
@@ -342,7 +342,7 @@
use crate::codec::{Decoder, Encoder, Framed, FramedRead, FramedWrite};
-use tokio_io::{AsyncRead, AsyncWrite};
+use tokio::io::{AsyncRead, AsyncWrite};
use bytes::{Buf, BufMut, Bytes, BytesMut, IntoBuf};
use std::error::Error as StdError;
@@ -605,7 +605,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -649,7 +649,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -673,7 +673,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -697,7 +697,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -731,7 +731,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -755,7 +755,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -778,7 +778,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -799,7 +799,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -823,7 +823,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -865,7 +865,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncRead;
+ /// # use tokio::io::AsyncRead;
/// use tokio_util::codec::LengthDelimitedCodec;
///
/// # fn bind_read<T: AsyncRead>(io: T) {
@@ -890,7 +890,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::AsyncWrite;
+ /// # use tokio::io::AsyncWrite;
/// # use tokio_util::codec::LengthDelimitedCodec;
/// # fn write_frame<T: AsyncWrite>(io: T) {
/// LengthDelimitedCodec::builder()
@@ -911,7 +911,7 @@ impl Builder {
/// # Examples
///
/// ```
- /// # use tokio_io::{AsyncRead, AsyncWrite};
+ /// # use tokio::io::{AsyncRead, AsyncWrite};
/// # use tokio_util::codec::LengthDelimitedCodec;
/// # fn write_frame<T: AsyncRead + AsyncWrite>(io: T) {
/// # let _ =