Skip to content

Commit 8e0faf7

Browse files
committed
Simplify PATH key comparison
1 parent 6212904 commit 8e0faf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys_common/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<K: EnvKey> CommandEnv<K> {
129129
self.saw_path || self.clear
130130
}
131131
fn maybe_saw_path(&mut self, key: &OsStr) {
132-
if !self.saw_path && key.to_os_string() == OsString::from("PATH") {
132+
if !self.saw_path && key == "PATH" {
133133
self.saw_path = true;
134134
}
135135
}

0 commit comments

Comments
 (0)