diff --git a/CHANGES.md b/CHANGES.md index 9a3aa9c0f..f5de3a73f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,8 @@ ## 0.5.0 (in the future) * Migrate to actix-web 2.0.0 and std::future +* Update prost to 0.6 +* Update bytes to 0.5 ## 0.4.1 (2019-10-03) diff --git a/Cargo.toml b/Cargo.toml index 61280e836..2e87fcba7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-protobuf" -version = "0.4.1" +version = "0.5.0" edition = "2018" authors = ["kingxsp , Yuki Okushi "] description = "Protobuf support for actix-web framework." @@ -20,7 +20,7 @@ name = "actix_protobuf" path = "src/lib.rs" [dependencies] -bytes = "0.4" +bytes = "0.5" futures = "0.3.1" derive_more = "0.99" diff --git a/examples/prost-example/Cargo.toml b/examples/prost-example/Cargo.toml index 555b74913..353710bc4 100644 --- a/examples/prost-example/Cargo.toml +++ b/examples/prost-example/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "prost-example" -version = "0.4.0" +version = "0.5.0" edition = "2018" authors = ["kingxsp , Yuki Okushi "] [dependencies] -bytes = "0.4" +bytes = "0.5" env_logger = "*" -prost = "0.5.0" -prost-derive = "0.5.0" +prost = "0.6.0" +prost-derive = "0.6.0" actix = "0.9" actix-rt = "1" diff --git a/src/lib.rs b/src/lib.rs index b82795e61..c9b2f9ddd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ use std::pin::Pin; use std::task; use std::task::Poll; -use bytes::{BytesMut, IntoBuf}; +use bytes::BytesMut; use prost::DecodeError as ProtoBufDecodeError; use prost::EncodeError as ProtoBufEncodeError; use prost::Message; @@ -239,7 +239,7 @@ impl Future for ProtoBufMessage { } } - return Ok(::decode(&mut body.into_buf())?); + return Ok(::decode(&mut body)?); } .boxed_local(), );