Skip to content

Commit

Permalink
Repair rust-analyzer for tonic files (#1604)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngoguey42 authored Jan 25, 2024
1 parent a1d6daa commit f714f42
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tonic-build/src/prost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,9 @@ impl Builder {
protos: &[impl AsRef<Path>],
includes: &[impl AsRef<Path>],
) -> 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())
};

config.out_dir(out_dir);
if let Some(out_dir) = self.out_dir.as_ref() {
config.out_dir(out_dir);
}
if let Some(path) = self.file_descriptor_set_path.as_ref() {
config.file_descriptor_set_path(path);
}
Expand Down

0 comments on commit f714f42

Please sign in to comment.