mirror of https://github.com/fafhrd91/actix-net
Update actix-codec to tokio 0.2
This commit is contained in:
parent
c254bb978c
commit
5cb5fdf499
|
@ -18,9 +18,9 @@ name = "actix_codec"
|
|||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4.12"
|
||||
bytes = "0.5"
|
||||
futures = "0.3.1"
|
||||
pin-project = "0.4.5"
|
||||
tokio-io = "0.2.0-alpha.6"
|
||||
tokio-codec = "0.2.0-alpha.6"
|
||||
log = "0.4"
|
||||
tokio = { version = "0.2", features = ["io-std", "io-util"] }
|
||||
tokio-util = { version = "0.2", features = ["codec"] }
|
||||
log = "0.4"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::io;
|
||||
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use tokio_codec::{Decoder, Encoder};
|
||||
use tokio_util::codec::{Decoder, Encoder};
|
||||
|
||||
/// Bytes codec.
|
||||
///
|
||||
|
@ -27,7 +27,7 @@ impl Decoder for BytesCodec {
|
|||
if src.is_empty() {
|
||||
Ok(None)
|
||||
} else {
|
||||
Ok(Some(src.take()))
|
||||
Ok(Some(src.split()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ use std::task::{Context, Poll};
|
|||
use bytes::BytesMut;
|
||||
use futures::{ready, Sink, Stream};
|
||||
use pin_project::pin_project;
|
||||
use tokio_codec::{Decoder, Encoder};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use tokio_util::codec::{Decoder, Encoder};
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
|
||||
const LW: usize = 1024;
|
||||
const HW: usize = 8 * 1024;
|
||||
|
|
|
@ -16,5 +16,5 @@ mod framed;
|
|||
pub use self::bcodec::BytesCodec;
|
||||
pub use self::framed::{Framed, FramedParts};
|
||||
|
||||
pub use tokio_codec::{Decoder, Encoder};
|
||||
pub use tokio_io::{AsyncRead, AsyncWrite};
|
||||
pub use tokio_util::codec::{Decoder, Encoder};
|
||||
pub use tokio::io::{AsyncRead, AsyncWrite};
|
||||
|
|
Loading…
Reference in New Issue