From a37640c2825691504539d70a2be3b8b62ccd3fe7 Mon Sep 17 00:00:00 2001 From: Lucio Franco Date: Tue, 24 Sep 2019 16:09:26 -0400 Subject: [PATCH] Fix doctest --- tonic-build/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tonic-build/src/lib.rs b/tonic-build/src/lib.rs index 01cbc4a..aa3ba8b 100644 --- a/tonic-build/src/lib.rs +++ b/tonic-build/src/lib.rs @@ -5,23 +5,23 @@ //! Simple //! //! ```rust,no_run -//! fn main() { -//! tonic_build::compile_protos("proto/service.proto").unwrap(); +//! fn main() -> Result<(), Box> { +//! tonic_build::compile_protos("proto/service.proto")?; +//! Ok(()) //! } //! ``` //! //! Configuration //! //! ```rust,no_run -//! fn main() { +//! fn main() -> Result<(), Box> { //! tonic_build::configure() //! .build_server(false) //! .compile( //! &["proto/helloworld/helloworld.proto"], //! &["proto/helloworld"], -//! "helloworld", -//! ) -//! .unwrap(); +//! )?; +//! Ok(()) //! } //! ```