Skip to content

Commit d0c2939

Browse files
committed
Address review comment, no need to check export_dir.
1 parent 251502b commit d0c2939

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/cargo/core/compiler/context/compilation_files.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,8 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> {
113113
}
114114
}
115115

116-
pub fn export_dir(&self, unit: &Unit<'a>) -> Option<PathBuf> {
117-
if self.roots.contains(unit) {
118-
self.export_dir.clone()
119-
} else {
120-
None
121-
}
116+
pub fn export_dir(&self) -> Option<PathBuf> {
117+
self.export_dir.clone()
122118
}
123119

124120
pub fn pkg_dir(&self, unit: &Unit<'a>) -> String {

src/cargo/core/compiler/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ fn link_targets<'a, 'cfg>(
362362
) -> CargoResult<Work> {
363363
let bcx = cx.bcx;
364364
let outputs = cx.outputs(unit)?;
365-
let export_dir = cx.files().export_dir(unit);
365+
let export_dir = cx.files().export_dir();
366366
let package_id = unit.pkg.package_id().clone();
367367
let target = unit.target.clone();
368368
let profile = unit.profile;

0 commit comments

Comments
 (0)