From c5042b14c3e26a187266436ee1da326afc06d76b Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Mon, 30 Sep 2019 19:13:27 -0400 Subject: [PATCH] Fix tests --- tonic/Cargo.toml | 4 ++-- tonic/src/codegen.rs | 2 +- tonic/src/macros.rs | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tonic/Cargo.toml b/tonic/Cargo.toml index d8e29d8..47e725a 100644 --- a/tonic/Cargo.toml +++ b/tonic/Cargo.toml @@ -24,7 +24,7 @@ keywords = ["rpc", "grpc", "async", "futures", "protobuf"] [features] default = ["transport", "codegen"] -codegen = ["async-trait", "prost", "prost-derive", "bytes"] +codegen = ["async-trait", "prost", "prost-derive"] transport = [ "hyper", "tokio", @@ -38,6 +38,7 @@ rustls = ["tokio-rustls", "tls"] tls = [] [dependencies] +bytes = "0.4" futures-core-preview = "=0.3.0-alpha.18" futures-util-preview = "=0.3.0-alpha.18" tracing = "0.1" @@ -57,7 +58,6 @@ prost-derive = { version = "0.5", optional = true } # codegen async-trait = { version = "0.1.13", optional = true } -bytes = {version = "0.4", optional = true} # transport hyper = { git = "https://github.com/hyperium/hyper", features = ["unstable-stream"], optional = true, rev = "2b0405c48c10bca7893c30ea960ac20a41a8578f" } diff --git a/tonic/src/codegen.rs b/tonic/src/codegen.rs index 7f7b416..52116d7 100644 --- a/tonic/src/codegen.rs +++ b/tonic/src/codegen.rs @@ -35,6 +35,6 @@ impl std::fmt::Display for Never { impl std::error::Error for Never {} +pub use bytes::*; pub use prost::*; pub use prost_derive::*; -pub use bytes::*; diff --git a/tonic/src/macros.rs b/tonic/src/macros.rs index 3f87db6..ca90cd1 100644 --- a/tonic/src/macros.rs +++ b/tonic/src/macros.rs @@ -1,11 +1,6 @@ /// Include generated proto server and client items. /// -/// # Example -/// ```rust,no_run -/// pub mod hello_world { -/// tonic::include_proto!("helloworld"); -/// } -/// ``` +/// You must specify the gRPC package name. #[macro_export] macro_rules! include_proto { ($package: tt) => {