tag | 20344186a688fe5e6550b8d62bfe53ba863ae58c | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu Oct 05 10:16:34 2023 -0700 |
object | 80f6437323cd912d618947d55089c08b4fcf84d7 |
frc_340818170 (10768146,com.google.android.art)
commit | 80f6437323cd912d618947d55089c08b4fcf84d7 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 18:03:10 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 18:03:10 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 2b596593b704dce3b2f40e2526a8536ebecb54d4 [diff] | |
parent | f582dc5f46a8edaadc2f6b8512687d992f6c53ba [diff] |
Snap for 9912757 from f582dc5f46a8edaadc2f6b8512687d992f6c53ba to aml-frc-release Change-Id: I262ca61e92a0487baf99aa5ecef4a2793f1025d1
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.