regex: s/locations/captures

Now that we use regex-automata, we no longer use any type with
"locations" in it. Instead, that's mostly legacy from the top-level
regex crate.
This commit is contained in:
Andrew Gallant
2023-06-17 10:04:54 -04:00
parent 51480d57a6
commit a6dbff502f
3 changed files with 23 additions and 24 deletions

View File

@@ -14,7 +14,6 @@ impl Error {
}
pub(crate) fn regex(err: regex_automata::meta::BuildError) -> Error {
// Error { kind: ErrorKind::Regex(err.to_string()) }
if let Some(size_limit) = err.size_limit() {
let kind = ErrorKind::Regex(format!(
"compiled regex exceeds size limit of {size_limit}",
@@ -66,7 +65,7 @@ pub enum ErrorKind {
impl std::error::Error for Error {}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
use bstr::ByteSlice;
match self.kind {