mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-03-23 04:34:39 +02:00
ripgrep does not, and likely never will, report which pattern matched. Because of that, we can dedup the patterns via just their concrete syntax without any fuss. This is somewhat of a pathological case because you don't expect the end user to pass duplicate patterns in general. But if the end user generated a list of, say, names and did not dedup them, then ripgrep could end up spending a lot of extra time on those duplicates if there are many of them. By deduping them explicitly in the application, we essentially remove their extra cost completely.