tag | 4fab90df6893f6cec2c864f139fb6317269ce246 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Aug 22 14:18:35 2022 -0700 |
object | 7d17777de3db1d7f53012d47adf30709527865b2 |
Platform Tools Release 33.0.3 (8952118)
commit | 7d17777de3db1d7f53012d47adf30709527865b2 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 16 06:31:22 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Aug 16 06:31:22 2022 +0000 |
tree | 74b760abd18f993e3501cabf9342ccb8d6b484f5 | |
parent | 1de8935ecadf1c3eb8d921307aa27eebb5da87b0 [diff] | |
parent | a24c6972f58a35254904fea36d731c54d1f10a26 [diff] |
Snap for 8952093 from a24c6972f58a35254904fea36d731c54d1f10a26 to sdk-release Change-Id: I1b7656e030bd812abcb948f4dc38dbedc0291319
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.