Skip to content

Commit

Permalink
Merge pull request #33 from epage/features
Browse files Browse the repository at this point in the history
Adjust features
  • Loading branch information
epage authored Mar 29, 2022
2 parents 5c7308c + 3639c99 commit 63d1548
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- name: All features
run: cargo test --target ${{ matrix.target }} --workspace --all-features
- name: No-default features
run: cargo test --target ${{ matrix.target }} --workspace --no-default-features
run: cargo test --target ${{ matrix.target }} --workspace --no-default-features --features std
miri:
name: Miri
runs-on: ubuntu-latest
Expand All @@ -113,7 +113,7 @@ jobs:
- name: All features
run: cargo miri test --all-features
- name: No-default features
run: cargo miri test --no-default-features
run: cargo miri test --no-default-features --features std
msrv:
name: "Check MSRV: 1.59.0"
runs-on: ubuntu-latest
Expand All @@ -132,7 +132,7 @@ jobs:
- name: All features
run: cargo check --workspace --all-targets --all-features
- name: No-default features
run: cargo check --workspace --all-targets --no-default-features
run: cargo check --workspace --all-targets --no-default-features --features std
docs:
name: Docs
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: All features
run: cargo test --workspace --all-features
- name: No-default features
run: cargo test --workspace --no-default-features
run: cargo test --workspace --no-default-features --features std
miri:
name: Miri
runs-on: ubuntu-latest
Expand All @@ -51,7 +51,7 @@ jobs:
- name: All features
run: cargo miri test --all-features
- name: No-default features
run: cargo miri test --no-default-features
run: cargo miri test --no-default-features --features std
rustfmt:
name: rustfmt
strategy:
Expand Down
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ pre-release-replacements = [
]

[features]
default = ["unsafe", "serde"]
default = ["std", "unsafe"]

## Allow use of `std`
std = []

## O(1) clone support
arc = []
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
#![cfg_attr(feature = "safe", forbid(unsafe_code))]

#[cfg(not(feature = "std"))]
compile_error!("`std` feature is required; reserved for future `no_std` support");

mod stack;
mod string;
mod string_cow;
Expand Down

0 comments on commit 63d1548

Please sign in to comment.