tag | da053c2181fe5286533c7a5b82dc49c27033fbda | |
---|---|---|
tagger | Xin Li <delphij@google.com> | Wed Apr 24 20:17:14 2024 -0700 |
object | 7f525d43c9676ae489e7a88eb227e6dcc08c600a |
aml_odp_341610000 (11382236,com.google.android.go.ondevicepersonalization,com.google.android.ondevicepersonalization)
commit | 7f525d43c9676ae489e7a88eb227e6dcc08c600a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:15:34 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:15:34 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 9ecce386058864361a051e6f4e522518bf53692f [diff] | |
parent | 878f532dd57bdcbce44364b7eecb1811140e99b7 [diff] |
Snap for 10453938 from 878f532dd57bdcbce44364b7eecb1811140e99b7 to mainline-odp-release Change-Id: I5d80335c1d021d5bda578e4d10cb90f0eba857c9
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.