tag | 49d40ed19641b10afcc9a9f13716beb1862c3c3c | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Oct 31 22:48:19 2023 -0700 |
object | f687dba3464090827879aaed39031904699a26b9 |
aml_sdk_341010000 (10612134,com.google.android.go.sdkext,com.google.android.sdkext)
commit | f687dba3464090827879aaed39031904699a26b9 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:15:35 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:15:35 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 090786728067133030c736046b9c379831d42356 [diff] | |
parent | 878f532dd57bdcbce44364b7eecb1811140e99b7 [diff] |
Snap for 10453563 from 878f532dd57bdcbce44364b7eecb1811140e99b7 to mainline-sdkext-release Change-Id: I3bd896d4e35bd6f3d4dfd499e011a5dc17742b84
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.