summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Plisko <cyril.plisko@mountall.com>2017-12-05 13:27:01 -0500
committerCyril Plisko <cyril.plisko@mountall.com>2017-12-05 13:27:01 -0500
commit2cfe498664df2062bd20487fa50601cb5bc6361e (patch)
tree594fac8adb761cd84c1f3244ce29b49306f346ac
parent9dc4037547f164e529cb12f4fbc7b1caf673ee78 (diff)
Tiny cleanup
-rw-r--r--src/utils.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 4084b8a..1c38760 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -49,8 +49,7 @@ pub fn pipe() -> (i32, i32) {
fn which(exec: &str) -> Option<OsString> {
if let Some(path) = env::var_os("PATH") {
- let paths = env::split_paths(&path);
- for path in paths {
+ for path in env::split_paths(&path) {
let candidate = path.join(exec);
if path.join(exec).exists() {
return Some(candidate.into_os_string());