Skip to content

Commit

Permalink
Update documents refer tonic_build::prost
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlmint committed Jan 30, 2020
1 parent a0e085d commit c12cc97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/helloworld-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>> {
tonic_build::compile_protos("proto/helloworld.proto")?;
tonic_build::prost::compile_protos("proto/helloworld.proto")?;
Ok(())
}
```
Expand Down
4 changes: 2 additions & 2 deletions examples/routeguide-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
```
Expand Down Expand Up @@ -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"])
Expand Down
4 changes: 2 additions & 2 deletions tonic-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tonic-build = <tonic-version>

```rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("proto/service.proto")?;
tonic_build::prost::compile_protos("proto/service.proto")?;
Ok(())
}
```
Expand All @@ -32,7 +32,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

```rust
fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
tonic_build::prost::configure()
.build_server(false)
.compile(
&["proto/helloworld/helloworld.proto"],
Expand Down

0 comments on commit c12cc97

Please sign in to comment.