diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3894efc..6bd2f46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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.61.0 && rustup component add clippy && rustup toolchain install nightly - uses: Swatinem/rust-cache@v2 + - run: cargo +nightly update -Z direct-minimal-versions && cargo update -p regex --precise 1.9.6 - 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 @@ -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 @@ -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.61.0 - uses: Swatinem/rust-cache@v2 - run: cargo doc --all-features --no-deps env: diff --git a/Cargo.toml b/Cargo.toml index f566ab9..e4c1d11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ description = """ Simple and fast implementation of language tag normalization and validation """ edition = "2018" -rust-version = "1.58" +rust-version = "1.61" [features] default = ["std"] @@ -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]] diff --git a/README.md b/README.md index 933e8e0..40f72c7 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ assert_eq!(language_tag.extension(), None); assert_eq!(language_tag.private_use_subtags().collect::>(), 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 ``).