From c12cc97e9009d3e21db57bb5de6fdac7bc02f168 Mon Sep 17 00:00:00 2001 From: Gyusun Yeom Date: Wed, 8 Jan 2020 22:42:50 +0900 Subject: [PATCH] Update documents refer tonic_build::prost --- examples/helloworld-tutorial.md | 2 +- examples/routeguide-tutorial.md | 4 ++-- tonic-build/README.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/helloworld-tutorial.md b/examples/helloworld-tutorial.md index 608768bab..ae435b541 100644 --- a/examples/helloworld-tutorial.md +++ b/examples/helloworld-tutorial.md @@ -129,7 +129,7 @@ At the root of your crate, create a `build.rs` file and add the following code: ```rust fn main() -> Result<(), Box> { - tonic_build::compile_protos("proto/helloworld.proto")?; + tonic_build::prost::compile_protos("proto/helloworld.proto")?; Ok(()) } ``` diff --git a/examples/routeguide-tutorial.md b/examples/routeguide-tutorial.md index e641d2798..a0b61e3ad 100644 --- a/examples/routeguide-tutorial.md +++ b/examples/routeguide-tutorial.md @@ -199,7 +199,7 @@ Create a `build.rs` file at the root of your crate: ```rust fn main() { - tonic_build::compile_protos("proto/route_guide.proto") + tonic_build::prost::compile_protos("proto/route_guide.proto") .unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e)); } ``` @@ -826,7 +826,7 @@ opposed to at build time, placing the resulting modules wherever we need them. ```rust fn main() { - tonic_build::configure() + tonic_build::prost::configure() .build_client(false) .out_dir("another_crate/src/pb") .compile(&["path/my_proto.proto"], &["path"]) diff --git a/tonic-build/README.md b/tonic-build/README.md index c7a5652eb..6a272aeee 100644 --- a/tonic-build/README.md +++ b/tonic-build/README.md @@ -23,7 +23,7 @@ tonic-build = ```rust fn main() -> Result<(), Box> { - tonic_build::compile_protos("proto/service.proto")?; + tonic_build::prost::compile_protos("proto/service.proto")?; Ok(()) } ``` @@ -32,7 +32,7 @@ fn main() -> Result<(), Box> { ```rust fn main() -> Result<(), Box> { - tonic_build::configure() + tonic_build::prost::configure() .build_server(false) .compile( &["proto/helloworld/helloworld.proto"],