gecko-dev/third_party/rust/which
Andy Grover dce9a42b82 Bug 1657466 - Update to Neqo 0.4.9 r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86087
2020-08-06 04:54:05 +00:00
..
src
tests
.cargo-checksum.json
Cargo.toml
LICENSE.txt
README.md
appveyor.yml

README.md

Travis Build Status Appveyor Build status

which

A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS

Example

To find which rustc exectable binary is using.

use which::which;

let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));

Errors

By default this crate exposes a failure based error. This is optional, disable the default features to get an error type implementing the standard library Error trait.

Documentation

The documentation is available online.