Skip to content

Commit a071c3a

Browse files
committed
Fixup some minor review comments
1 parent 72e6b9d commit a071c3a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/cargo/core/compiler/build_plan.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,20 @@ impl Invocation {
7373
self.program = cmd.get_program()
7474
.to_str()
7575
.ok_or_else(|| format_err!("unicode program string required"))?
76-
.to_string()
77-
.clone();
76+
.to_string();
7877
self.cwd = Some(cmd.get_cwd().unwrap().to_path_buf());
7978
for arg in cmd.get_args().iter() {
8079
self.args.push(
8180
arg.to_str()
8281
.ok_or_else(|| format_err!("unicode argument string required"))?
83-
.to_string()
84-
.clone(),
82+
.to_string(),
8583
);
8684
}
87-
for var in cmd.get_envs().keys() {
88-
let value = cmd.get_env(var).unwrap_or_default();
85+
for (var, value) in cmd.get_envs() {
86+
let value = match value {
87+
Some(s) => s,
88+
None => continue,
89+
};
8990
self.env.insert(
9091
var.clone(),
9192
value

0 commit comments

Comments
 (0)