Skip to content

Commit f714f42

Browse files
authored
Repair rust-analyzer for tonic files (#1604)
1 parent a1d6daa commit f714f42

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tonic-build/src/prost.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -541,13 +541,9 @@ impl Builder {
541541
protos: &[impl AsRef<Path>],
542542
includes: &[impl AsRef<Path>],
543543
) -> io::Result<()> {
544-
let out_dir = if let Some(out_dir) = self.out_dir.as_ref() {
545-
out_dir.clone()
546-
} else {
547-
PathBuf::from(std::env::var("OUT_DIR").unwrap())
548-
};
549-
550-
config.out_dir(out_dir);
544+
if let Some(out_dir) = self.out_dir.as_ref() {
545+
config.out_dir(out_dir);
546+
}
551547
if let Some(path) = self.file_descriptor_set_path.as_ref() {
552548
config.file_descriptor_set_path(path);
553549
}

0 commit comments

Comments
 (0)