Skip to content

Commit b754c66

Browse files
committed
feat(env_filter): make the regex feature compatible with no_std
1 parent 663c9c2 commit b754c66

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ jobs:
7676
- cargo hack check --each-feature --locked --rust-version --ignore-private --package env_logger --all-targets --keep-going
7777
# When the std feature is enabled, a lower MSRV of 1.71 is sufficient and was the MSRV for the crate before std was made optional.
7878
# To make sure we keep it that way, check configurations with std enabled and disabled separately and with their respective MSRVs.
79-
# "--at-least-one-of" requires "--feature-powerset", which can be made to emulate "--each-feature" with "--depth 1".
80-
- cargo hack check --feature-powerset --depth 1 --locked --version-range 1.71..=1.71 --ignore-private --package env_filter --all-targets --keep-going --at-least-one-of std,default,regex
81-
- cargo hack check --no-default-features --locked --version-range 1.81..=1.81 --ignore-private --package env_filter --all-targets --keep-going
79+
- cargo hack check --feature-powerset --depth 2 --locked --version-range 1.71..=1.71 --ignore-private --package env_filter --all-targets --keep-going --at-least-one-of std,default
80+
- cargo hack check --each-feature --locked --version-range 1.81..=1.81 --ignore-private --package env_filter --all-targets --keep-going --exclude-features std,default
8281
minimal-versions:
8382
name: Minimal versions
8483
strategy:

crates/env_filter/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ pre-release-replacements = [
2626

2727
[features]
2828
default = ["std", "regex"]
29-
regex = ["std", "dep:regex"]
30-
std = []
29+
regex = ["dep:regex"]
30+
std = ["regex/std"]
3131

3232
[dependencies]
3333
log = { version = "0.4.29", default-features = false }
34-
regex = { version = "1.12.3", optional = true, default-features=false, features=["std", "perf"] }
34+
regex = { version = "1.12.3", optional = true, default-features=false, features=["perf"] }
3535

3636
[dev-dependencies]
3737
snapbox = "1.0"

0 commit comments

Comments
 (0)