tag | 19230945eadf72ee7c4c439cea7373a009891695 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Nov 01 11:33:45 2023 -0700 |
object | 223666ff9cc4ec72ae625ee348e1e7e90d386703 |
aml_sta_341010020 (10692035,com.google.android.go.os.statsd,com.google.android.os.statsd)
commit | 223666ff9cc4ec72ae625ee348e1e7e90d386703 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:07:41 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:07:41 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | e42091b9afa8b1d9cb0d0418bba7a2b1e23eeca8 [diff] | |
parent | 878f532dd57bdcbce44364b7eecb1811140e99b7 [diff] |
Snap for 10453563 from 878f532dd57bdcbce44364b7eecb1811140e99b7 to mainline-os-statsd-release Change-Id: I7dfb065f060cc66a8e522bb9cc42ae35e957cd5d
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.