Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check std feature against kv_unstable #434

Merged
merged 3 commits into from Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/main.yml
Expand Up @@ -40,8 +40,9 @@ 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
- 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

Expand All @@ -57,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
Expand Down
8 changes: 4 additions & 4 deletions src/kv/value.rs
Expand Up @@ -427,7 +427,7 @@ impl<'v> Value<'v> {
}
}

#[cfg(feature = "std")]
#[cfg(feature = "kv_unstable_std")]
mod std_support {
use super::*;

Expand Down Expand Up @@ -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());
}

Expand All @@ -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());
}
}
Expand Down