tag | 2c71d8fb73a69cc3d6438a674220868613954a7b | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Apr 24 16:49:54 2024 -0700 |
object | 3bbc3bdbbd95d89818164d10425a30bc2b1934f2 |
aml_doc_341610010 (11531283,com.google.android.documentsui,com.google.android.go.documentsui)
commit | 3bbc3bdbbd95d89818164d10425a30bc2b1934f2 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 04:53:26 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 04:53:26 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 8780e617fd18316ef1460d0ec60280d13fc15aca [diff] | |
parent | 878f532dd57bdcbce44364b7eecb1811140e99b7 [diff] |
Snap for 10453563 from 878f532dd57bdcbce44364b7eecb1811140e99b7 to mainline-documentsui-release Change-Id: I378b0510bedef8cfad49d949508e68d6c3cc1bf1
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.