From 32b2998713c9e7ebac9ae4bcd29aec4a7e3872a1 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Thu, 20 Feb 2025 16:58:43 +0100 Subject: [PATCH] Upgrade the matchers crate This avoids pulling in an old version of regex-automata. --- tracing-subscriber/Cargo.toml | 2 +- tracing-subscriber/src/filter/env/field.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index edc7f2346..6ab904b82 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -43,7 +43,7 @@ tracing-core = { path = "../tracing-core", version = "0.2", default-features = f # only required by the `env-filter` feature tracing = { optional = true, path = "../tracing", version = "0.2", default-features = false } -matchers = { optional = true, version = "0.1.0" } +matchers = { optional = true, version = "0.2.0" } regex = { optional = true, version = "1.6.0", default-features = false, features = ["std", "unicode-case", "unicode-perl"] } smallvec = { optional = true, version = "1.9.0" } once_cell = { optional = true, version = "1.13.0" } diff --git a/tracing-subscriber/src/filter/env/field.rs b/tracing-subscriber/src/filter/env/field.rs index d08cca15e..bc32e4aaa 100644 --- a/tracing-subscriber/src/filter/env/field.rs +++ b/tracing-subscriber/src/filter/env/field.rs @@ -234,7 +234,7 @@ impl ValueMatch { /// This returns an error if the string didn't contain a valid `bool`, /// `u64`, `i64`, or `f64` literal, and couldn't be parsed as a regular /// expression. - fn parse_regex(s: &str) -> Result { + fn parse_regex(s: &str) -> Result { s.parse::() .map(ValueMatch::Bool) .or_else(|_| s.parse::().map(ValueMatch::U64)) @@ -279,7 +279,7 @@ impl fmt::Display for ValueMatch { // === impl MatchPattern === impl FromStr for MatchPattern { - type Err = matchers::Error; + type Err = matchers::BuildError; fn from_str(s: &str) -> Result { let matcher = Pattern::new_anchored(s)?; Ok(Self {