Skip to content

Commit

Permalink
Make silence unused warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlmint committed Jan 8, 2020
1 parent b7f53dd commit 9881a64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tonic-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ impl Builder {
}

/// Compile the .proto files and execute code generation.
pub fn compile<P: AsRef<Path>>(self, protos: &[P], includes: &[P]) -> io::Result<()> {
let out_dir = if let Some(out_dir) = self.out_dir.as_ref() {
pub fn compile<P: AsRef<Path>>(self, _protos: &[P], _includes: &[P]) -> io::Result<()> {
let _out_dir = if let Some(out_dir) = self.out_dir.as_ref() {
out_dir.clone()
} else {
PathBuf::from(std::env::var("OUT_DIR").unwrap())
Expand All @@ -145,12 +145,12 @@ impl Builder {
let format = self.format;

#[cfg(feature = "prost")]
prost::compile(self, out_dir.clone(), protos, includes)?;
prost::compile(self, _out_dir.clone(), _protos, _includes)?;

#[cfg(feature = "rustfmt")]
{
if format {
fmt(out_dir.to_str().expect("Expected utf8 out_dir"));
fmt(_out_dir.to_str().expect("Expected utf8 out_dir"));
}
}

Expand Down

0 comments on commit 9881a64

Please sign in to comment.