mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
parent
dc337bab0a
commit
eb4b389846
@ -19,7 +19,7 @@ Add this to your `Cargo.toml`:
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
globset = "0.3"
|
globset = "0.4"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
@ -78,12 +78,12 @@ assert_eq!(set.matches("src/bar/baz/foo.rs"), vec![0, 2]);
|
|||||||
|
|
||||||
This crate implements globs by converting them to regular expressions, and
|
This crate implements globs by converting them to regular expressions, and
|
||||||
executing them with the
|
executing them with the
|
||||||
[`regex`](https://github.com/rust-lang-nursery/regex)
|
[`regex`](https://github.com/rust-lang/regex)
|
||||||
crate.
|
crate.
|
||||||
|
|
||||||
For single glob matching, performance of this crate should be roughly on par
|
For single glob matching, performance of this crate should be roughly on par
|
||||||
with the performance of the
|
with the performance of the
|
||||||
[`glob`](https://github.com/rust-lang-nursery/glob)
|
[`glob`](https://github.com/rust-lang/glob)
|
||||||
crate. (`*_regex` correspond to benchmarks for this library while `*_glob`
|
crate. (`*_regex` correspond to benchmarks for this library while `*_glob`
|
||||||
correspond to benchmarks for the `glob` library.)
|
correspond to benchmarks for the `glob` library.)
|
||||||
Optimizations in the `regex` crate may propel this library past `glob`,
|
Optimizations in the `regex` crate may propel this library past `glob`,
|
||||||
@ -108,7 +108,7 @@ test many_short_glob ... bench: 1,063 ns/iter (+/- 47)
|
|||||||
test many_short_regex_set ... bench: 186 ns/iter (+/- 11)
|
test many_short_regex_set ... bench: 186 ns/iter (+/- 11)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Comparison with the [`glob`](https://github.com/rust-lang-nursery/glob) crate
|
### Comparison with the [`glob`](https://github.com/rust-lang/glob) crate
|
||||||
|
|
||||||
* Supports alternate "or" globs, e.g., `*.{foo,bar}`.
|
* Supports alternate "or" globs, e.g., `*.{foo,bar}`.
|
||||||
* Can match non-UTF-8 file paths correctly.
|
* Can match non-UTF-8 file paths correctly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user