[automerger skipped] Skip ab/6749736 in stage. am: cbd4aa00cf -s ours am: e9128a95d4 -s ours

am skip reason: Change-Id I421d8f9d0ae05635241da2db7936761a9cd4ce61 with SHA-1 74fd0b41eb is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/which/+/12797308

Change-Id: I0151739c2f3c530109c6769b17787e42f2c254d4
tree: 8950b023a47cbecb9f23a752bfcb21df1915e309
  1. src/
  2. tests/
  3. .cargo_vcs_info.json
  4. .gitignore
  5. .travis.yml
  6. Android.bp
  7. appveyor.yml
  8. Cargo.toml
  9. Cargo.toml.orig
  10. LICENSE.txt
  11. METADATA
  12. MODULE_LICENSE_BSD_LIKE
  13. OWNERS
  14. README.md
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"));

Documentation

The documentation is available online.