tag | 1d356445dcf8ea469d018fb090b27292b2470cbf | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Jan 30 14:48:24 2024 -0800 |
object | 01d9b719528c9c0d460ad95863f53c80085d3487 |
Platform Tools Release 34.0.5 (10900879)
commit | 01d9b719528c9c0d460ad95863f53c80085d3487 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:35:01 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jun 28 13:35:01 2023 +0000 |
tree | bb7fed649d07e5b24e581d19ccf3c547b2b86c62 | |
parent | 918c66cfebb1fd20d47c3417b4c3b8d99cee5857 [diff] | |
parent | f8c7b779bcf43565718f27dbff59f07d9afa4bfc [diff] |
Snap for 10399941 from f8c7b779bcf43565718f27dbff59f07d9afa4bfc to sdk-release Change-Id: If8fc653c94172f893fe313359c013e70dd73e73e
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.