Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ log = "0.4"
parking_lot = { version = "0.9", optional = true }
parity-scale-codec = { version = "1.0.3", optional = true, default-features = false, features = ["derive"] }
num = { package = "num-traits", version = "0.2", default-features = false }
hashmap_core = { version = "0.1.10", default-features = false }
hashbrown = { version = "0.6" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to compile with default-features = false. finality-grandpa is no-std compatible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hashbrown supports no_std by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't know that. Thanks :)


[dev-dependencies]
exit-future = "0.1.2"
Expand All @@ -22,6 +22,6 @@ tokio = "0.1.8"

[features]
default = ["std"]
std = ["parity-scale-codec/std", "hashmap_core/disable", "num/std", "parking_lot"]
std = ["parity-scale-codec/std", "num/std", "parking_lot"]
derive-codec = ["parity-scale-codec"]
test-helpers = []
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use collections::Vec;
mod collections {
pub use alloc::collections::*;
pub use alloc::vec::Vec;
pub use hashmap_core::{map as hash_map, HashMap, HashSet};
pub use hashbrown::{hash_map, HashMap, HashSet};
}

#[cfg(feature = "std")]
Expand Down