Mark 7df710e9f6 Accept owned and borrowed Regex
For performance, it is desirable to accept &Regex instead of Regex.
By changing changing to impl Borrow<Regex>, all existing code
remains valid, but &Regex is also accepted.
2021-11-30 22:31:26 +01:00
2021-08-28 20:55:00 +08:00
2021-11-30 22:31:26 +01:00
2021-11-30 22:31:26 +01:00
2021-07-31 14:19:23 +08:00
2015-10-06 19:24:01 +08:00
2021-03-17 11:16:28 -06:00

Build Status

which

A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS

Example

To find which rustc exectable binary is using.

use which::which;

let result = which::which("rustc").unwrap();
assert_eq!(result, PathBuf::from("/usr/bin/rustc"));

Documentation

The documentation is available online.

S
Description
提供查找可执行文件或库的路径的支持,可以在程序中查找指定可执行文件或库的路径。 | A Rust library that provides support for finding the path to an executable in the system's PATH.
Readme 636 KiB
Languages
Rust 100%