diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-25 11:41:20 +0300 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2018-09-25 11:41:20 +0300 |
commit | e234d00592e20b9b2cb24a75fcbdcbe6fec568a5 (patch) | |
tree | 21e5734e6721164c277a6673c82d220bb7e8b545 | |
parent | d3f481cef21a67048d4b2cc0837a9acb3ee30e11 (diff) |
Drop utils::which
-rw-r--r-- | src/utils.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/utils.rs b/src/utils.rs index c97c4d7..2a87e31 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -47,18 +47,6 @@ pub fn pipe() -> (i32, i32) { (fds[0], fds[1]) } -fn which(exec: &str) -> Option<OsString> { - if let Some(path) = env::var_os("PATH") { - for path in env::split_paths(&path) { - let candidate = path.join(exec); - if path.join(exec).exists() { - return Some(candidate.into_os_string()); - } - } - } - None -} - pub fn isatty(fd: i32) -> bool { let isatty = unsafe { libc::isatty(fd) }; isatty != 0 |