tag | 81fd7b44af57cf48d23dd316141c2fae5bd711a7 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Aug 31 06:45:55 2022 -0700 |
object | 22e167eed585cba16b696fff776167cbfc6685c8 |
t_frc_neu_330443000
commit | 22e167eed585cba16b696fff776167cbfc6685c8 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 28 16:17:13 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Apr 28 16:17:13 2022 +0000 |
tree | 0ee35a94c440d4b17b59f4adbc625f2cee3fb7f3 | |
parent | 5fd2c357960af442656c6f97b74b9137d25714e2 [diff] | |
parent | 90fdb407fc7b3314cccbf6638cbd48adb9da84d7 [diff] |
Snap for 8512216 from 90fdb407fc7b3314cccbf6638cbd48adb9da84d7 to tm-frc-neuralnetworks-release Change-Id: I8e30f2eef91574e7db4de570e2ac2ebb51e6bfbb
A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.
To find which rustc executable binary is using.
use which::which; let result = which("rustc").unwrap(); assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
After enabling the regex
feature, find all cargo subcommand executables on the path:
use which::which_re; which_re(Regex::new("^cargo-.*").unwrap()).unwrap() .for_each(|pth| println!("{}", pth.to_string_lossy()));
The documentation is available online.