From 0e005babc0d6107c30584d7e11590808235243ec Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Fri, 8 Jan 2021 14:01:53 +1000 Subject: [PATCH 1/3] check std feature against kv_unstable Check a few more permutations of `kv_unstable` features --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cee48555e..965331ee3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,8 @@ jobs: - run: cargo test --verbose --features kv_unstable - run: cargo test --verbose --features "kv_unstable std" - run: cargo test --verbose --features "kv_unstable_sval" + - run: cargo test --verbose --features "kv_unstable_sval std" + - run: cargo test --verbose --features "kv_unstable kv_unstable_std kv_unstable_sval kv_unstable_serde" - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release From b6491597eddf8e4f43bf4cc2af7275f8b26294f2 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Fri, 8 Jan 2021 14:13:48 +1000 Subject: [PATCH 2/3] add a feature check stage --- .github/workflows/main.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 965331ee3..d90d48baa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,9 +40,8 @@ jobs: - run: cargo test --verbose --features serde - run: cargo test --verbose --features std - run: cargo test --verbose --features kv_unstable - - run: cargo test --verbose --features "kv_unstable std" - - run: cargo test --verbose --features "kv_unstable_sval" - - run: cargo test --verbose --features "kv_unstable_sval std" + - run: cargo test --verbose --features kv_unstable_sval + - run: cargo test --verbose --features kv_unstable_serde - run: cargo test --verbose --features "kv_unstable kv_unstable_std kv_unstable_sval kv_unstable_serde" - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release @@ -59,6 +58,22 @@ jobs: rustup component add rustfmt - run: cargo fmt -- --check + features: + name: Feature check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Install Rust + run: | + rustup update nightly --no-self-update + rustup default nightly + - run: cargo build --verbose -Z avoid-dev-deps --features kv_unstable + - run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable std" + - run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_sval" + - run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_serde" + - run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_std" + - run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_sval kv_unstable_serde" + msrv: name: MSRV runs-on: ubuntu-latest From cc3d6edb5d96ef3da63f6096194d30f2ef358044 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Fri, 8 Jan 2021 14:18:01 +1000 Subject: [PATCH 3/3] use kv_unstable_std instead of std --- src/kv/value.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kv/value.rs b/src/kv/value.rs index a2fdda63e..bb79d9103 100644 --- a/src/kv/value.rs +++ b/src/kv/value.rs @@ -427,7 +427,7 @@ impl<'v> Value<'v> { } } -#[cfg(feature = "std")] +#[cfg(feature = "kv_unstable_std")] mod std_support { use super::*; @@ -615,7 +615,7 @@ pub(crate) mod tests { for v in str() { assert!(v.to_borrowed_str().is_some()); - #[cfg(feature = "std")] + #[cfg(feature = "kv_unstable_std")] assert!(v.to_str().is_some()); } @@ -624,13 +624,13 @@ pub(crate) mod tests { assert!(v.to_borrowed_str().is_some()); - #[cfg(feature = "std")] + #[cfg(feature = "kv_unstable_std")] assert!(v.to_str().is_some()); for v in unsigned().chain(signed()).chain(float()).chain(bool()) { assert!(v.to_borrowed_str().is_none()); - #[cfg(feature = "std")] + #[cfg(feature = "kv_unstable_std")] assert!(v.to_str().is_none()); } }