1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-23 21:54:45 +02:00
Files
ripgrep/crates
Ben Heidemann 859d54270e globset: make GlobSet::new public
For users of globset who already have a `Vec<Glob>` (or similar),
the current API requires them to iterate over their `Vec<Glob>`,
calling `GlobSetBuilder::add` for each `Glob`, thus constructing a new
`Vec<Glob>` internal to the GlobSetBuilder. This makes the consuming
code unnecessarily verbose. (There is unlikely to be any meaningful
performance impact of this, however, since the cost of allocating a new
`Vec` is likely marginal compared to the cost of glob compilation.)

Instead of taking a `&[Glob]`, we accept an iterator of anything that
can be borrowed as a `&Glob`. This required some light refactoring of
the constructor, but nothing onerous.

Closes #3066
2025-09-19 21:08:19 -04:00
..
2024-09-08 22:06:59 -04:00
2025-09-19 21:08:19 -04:00
2024-09-08 22:11:00 -04:00
2025-09-19 21:08:19 -04:00
2024-09-08 22:07:52 -04:00