Skip to content

Commit

Permalink
If --no-default-features is used, either std or hashbrown must be ena…
Browse files Browse the repository at this point in the history
…bled.
  • Loading branch information
mooman219 committed May 13, 2024
1 parent 9f67597 commit 7214019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exclude = ["dev/**"]
maintenance = { status = "experimental" }

[features]
# If using no default features, you must enable either hashbrown or std.
default = ["simd", "hashbrown"]
# Enable this flag to use std::HashMap instead of hashbrown::HashMap
std = []
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This is a no_std crate, but still requires the alloc crate.

#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![cfg_attr(all(not(test), not(feature = "std"), not(feature = "hashbrown")), no_std)]
#![allow(dead_code)]
#![allow(clippy::style)]
#![allow(clippy::complexity)]
Expand Down

0 comments on commit 7214019

Please sign in to comment.