Skip to content

Commit 77c00c8

Browse files
committed
Bump matchers. Add dependency on regex_automata with std.
1 parent 906f00c commit 77c00c8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tracing-subscriber/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rust-version = "1.63.0"
2727
default = ["smallvec", "fmt", "ansi", "tracing-log", "std"]
2828
alloc = ["tracing-core/alloc", "portable-atomic-util?/alloc"]
2929
std = ["alloc", "tracing-core/std"]
30-
env-filter = ["matchers", "once_cell", "tracing", "std", "thread_local"]
30+
env-filter = ["matchers", "once_cell", "tracing", "std", "thread_local", "dep:regex-automata"]
3131
fmt = ["registry", "std"]
3232
ansi = ["fmt", "nu-ansi-term"]
3333
registry = ["sharded-slab", "thread_local", "std"]
@@ -47,7 +47,9 @@ tracing-core = { path = "../tracing-core", version = "0.2", default-features = f
4747

4848
# only required by the `env-filter` feature
4949
tracing = { optional = true, path = "../tracing", version = "0.2", default-features = false }
50-
matchers = { optional = true, version = "0.1.0" }
50+
matchers = { optional = true, version = "0.2.0" }
51+
# required to have matchers::BuildError implement std::error::Error
52+
regex-automata = { optional = true, version = "0.4", default-features = false, features = ["std"] }
5153
smallvec = { optional = true, version = "1.9.0" }
5254
once_cell = { optional = true, version = "1.13.0" }
5355

tracing-subscriber/src/filter/env/field.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ impl ValueMatch {
234234
/// This returns an error if the string didn't contain a valid `bool`,
235235
/// `u64`, `i64`, or `f64` literal, and couldn't be parsed as a regular
236236
/// expression.
237-
fn parse_regex(s: &str) -> Result<Self, matchers::Error> {
237+
fn parse_regex(s: &str) -> Result<Self, matchers::BuildError> {
238238
s.parse::<bool>()
239239
.map(ValueMatch::Bool)
240240
.or_else(|_| s.parse::<u64>().map(ValueMatch::U64))
@@ -279,7 +279,7 @@ impl fmt::Display for ValueMatch {
279279
// === impl MatchPattern ===
280280

281281
impl FromStr for MatchPattern {
282-
type Err = matchers::Error;
282+
type Err = matchers::BuildError;
283283
fn from_str(s: &str) -> Result<Self, Self::Err> {
284284
let matcher = Pattern::new_anchored(s)?;
285285
Ok(Self {

0 commit comments

Comments
 (0)