Skip to content

Commit 1818096

Browse files
committed
deduplicate code
1 parent 46b48f6 commit 1818096

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/cargo/util/rustc.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@ impl Rustc {
8080

8181
/// Gets a process builder set up to use the found rustc version, with a wrapper if `Some`.
8282
pub fn process(&self) -> ProcessBuilder {
83-
match self.wrapper {
84-
Some(ref wrapper) if !wrapper.get_program().is_empty() => {
85-
let mut cmd = wrapper.clone();
86-
cmd.arg(&self.path);
87-
cmd
88-
}
89-
_ => self.process_no_wrapper(),
90-
}
83+
self.process_with(&self.path)
9184
}
9285

9386
pub fn process_no_wrapper(&self) -> ProcessBuilder {

0 commit comments

Comments
 (0)