tag | 4c52f3a55016818c6d3e9eb0b0747366ee539317 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu May 04 16:18:18 2023 -0700 |
object | 8cec0d73868c3e6a7da70c4f1896c78e2ca3abfe |
Platform Tools Release 34.0.1 (9680074)
commit | 8cec0d73868c3e6a7da70c4f1896c78e2ca3abfe | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 02 15:42:29 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Mar 02 15:42:29 2023 +0000 |
tree | 8d776c48ca763a8a92725842792c44c68bd6d5b0 | |
parent | 215aef1ed551c07045075c787462a9551efee257 [diff] | |
parent | a065455574fc17a5ddd2149526dcaf8a13556a07 [diff] |
Snap for 9679998 from a065455574fc17a5ddd2149526dcaf8a13556a07 to sdk-release Change-Id: I088db9215d597ea880dd7fe1c1d368f5bdb06437
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.