diff --git a/tonic-prost-build/Cargo.toml b/tonic-prost-build/Cargo.toml index 618567933..c5bbc893d 100644 --- a/tonic-prost-build/Cargo.toml +++ b/tonic-prost-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tonic-prost-build" -version = "0.14.1" +version = "0.15.0" authors = ["Lucio Franco "] edition = "2021" license = "MIT" diff --git a/tonic-prost-build/src/lib.rs b/tonic-prost-build/src/lib.rs index 3fcc9ac7f..333bc52a1 100644 --- a/tonic-prost-build/src/lib.rs +++ b/tonic-prost-build/src/lib.rs @@ -689,9 +689,10 @@ impl Builder { } /// Compile the .proto files and execute code generation. - pub fn compile_protos

(self, protos: &[P], includes: &[P]) -> io::Result<()> + pub fn compile_protos(self, protos: &[P], includes: &[I]) -> io::Result<()> where P: AsRef, + I: AsRef, { self.compile_with_config(Config::new(), protos, includes) } @@ -700,14 +701,15 @@ impl Builder { /// /// Note: When using a custom config, any disable_comments settings on the Builder will be ignored /// to preserve the disable_comments already configured on the provided Config. - pub fn compile_with_config

( + pub fn compile_with_config( self, mut config: Config, protos: &[P], - includes: &[P], + includes: &[I], ) -> io::Result<()> where P: AsRef, + I: AsRef, { let out_dir = if let Some(out_dir) = self.out_dir.as_ref() { out_dir.clone()