From 987ba7373cf95c570bf23768c6021f7a7508286e Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Sat, 26 Oct 2019 08:02:49 -0700 Subject: 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. --- tokio-util/src/codec/length_delimited.rs | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'tokio-util/src/codec/length_delimited.rs') 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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(io: T) { /// # let _ = -- cgit v1.2.3