tag | a20ebe02dd7d828db2c5ce45df734b8c29ad81fe | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Feb 03 17:02:20 2023 -0800 |
object | 215aef1ed551c07045075c787462a9551efee257 |
Platform Tools Release 34.0.0 (9560563)
commit | 215aef1ed551c07045075c787462a9551efee257 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Feb 01 11:03:31 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Feb 01 11:03:31 2023 +0000 |
tree | cd05acbe09b8ff210d8f290e531031b366a01b0f | |
parent | 7d17777de3db1d7f53012d47adf30709527865b2 [diff] | |
parent | 7b3816f38c354e37a6c4cdb997c2d263814499db [diff] |
Snap for 9550355 from 7b3816f38c354e37a6c4cdb997c2d263814499db to sdk-release Change-Id: I956f6103e63646c290a77a28f297bab19c265dba
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.