Simplify PATH key comparison

This commit is contained in:
Bryan Drewery 2018-03-19 16:15:26 -07:00
parent 6212904dd8
commit 8e0faf79c0

View File

@ -129,7 +129,7 @@ impl<K: EnvKey> CommandEnv<K> {
self.saw_path || self.clear
}
fn maybe_saw_path(&mut self, key: &OsStr) {
if !self.saw_path && key.to_os_string() == OsString::from("PATH") {
if !self.saw_path && key == "PATH" {
self.saw_path = true;
}
}