Skip to content

Commit

Permalink
Upgrades MSRV to 1.60 and test no-std
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt committed Mar 3, 2024
1 parent ac33682 commit b3969c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets
- run: cargo clippy --all-targets --all-features
- run: cargo clippy --all-targets --no-default-features

clippy_msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update && rustup override set 1.58.0 && rustup component add clippy
- run: rustup update && rustup override set 1.60.0 && rustup component add clippy && rustup toolchain install nightly
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly update -Z direct-minimal-versions
- run: cargo clippy --all-targets -- -D warnings -D clippy::all
- run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
- run: cargo clippy --all-targets --no-default-features -- -D warnings -D clippy::all

test:
runs-on: ubuntu-latest
Expand All @@ -35,10 +38,9 @@ jobs:
- run: rustup update
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features
- run: cargo test --verbose
- run: cargo test --verbose --all-features
env:
RUST_BACKTRACE: 1
- run: cargo test
- run: cargo test --all-features
- run: cargo test --no-default-features

rustdoc:
runs-on: ubuntu-latest
Expand All @@ -52,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update && rustup override set 1.58.0
- run: rustup update && rustup override set 1.60.0
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features --no-deps
env:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = """
Simple and fast implementation of language tag normalization and validation
"""
edition = "2018"
rust-version = "1.58"
rust-version = "1.60"

[features]
default = ["std"]
Expand All @@ -25,7 +25,7 @@ serialize = ["dep:serde"]
serde = { version = "1", optional = true, default_features = false }

[dev-dependencies]
criterion = "0.4"
criterion = ">=0.4,<0.6"
serde_test = "1"

[[bench]]
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ assert_eq!(language_tag.extension(), None);
assert_eq!(language_tag.private_use_subtags().collect::<Vec<_>>(), vec!["test"]);
```

It is also possible to use this crate in `no_std` (with `alloc`) by opting-out of the default `std` feature:
```toml
serde = { version = "*", default-features = false }
```

## License

This project is licensed under the MIT license ([LICENSE-MIT](LICENSE-MIT) or `<http://opensource.org/licenses/MIT>`).
Expand Down

0 comments on commit b3969c6

Please sign in to comment.