Skip to content

Commit 80483de

Browse files
committed
feat(prost-build): Relax bound on compile_protos and compile_with_config
1 parent 115b95c commit 80483de

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tonic-prost-build/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,10 @@ impl Builder {
689689
}
690690

691691
/// Compile the .proto files and execute code generation.
692-
pub fn compile_protos<P>(self, protos: &[P], includes: &[P]) -> io::Result<()>
692+
pub fn compile_protos<P, I>(self, protos: &[P], includes: &[I]) -> io::Result<()>
693693
where
694694
P: AsRef<Path>,
695+
I: AsRef<Path>,
695696
{
696697
self.compile_with_config(Config::new(), protos, includes)
697698
}
@@ -700,14 +701,15 @@ impl Builder {
700701
///
701702
/// Note: When using a custom config, any disable_comments settings on the Builder will be ignored
702703
/// to preserve the disable_comments already configured on the provided Config.
703-
pub fn compile_with_config<P>(
704+
pub fn compile_with_config<P, I>(
704705
self,
705706
mut config: Config,
706707
protos: &[P],
707-
includes: &[P],
708+
includes: &[I],
708709
) -> io::Result<()>
709710
where
710711
P: AsRef<Path>,
712+
I: AsRef<Path>,
711713
{
712714
let out_dir = if let Some(out_dir) = self.out_dir.as_ref() {
713715
out_dir.clone()

0 commit comments

Comments
 (0)