Skip to content

Commit b962088

Browse files
committed
TEST: Use twox-hash for testing nostd build
Uses shepmaster's hash crate for testing, it's simple and no-std, tip by cuviper.
1 parent 3702632 commit b962088

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test-nostd/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ name = "test-nostd"
33
version = "0.1.0"
44
authors = ["bluss"]
55
publish = false
6+
edition = "2018"
67

78
[dependencies]
89
indexmap = { path = ".." }
910
# no-std compatible hasher
10-
ahash = "0.2"
11+
twox-hash = { version = "1.5", default-features = false }
1112

1213
[dev-dependencies]

test-nostd/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#![no_std]
22

3-
extern crate indexmap;
4-
extern crate ahash;
5-
63
use indexmap::IndexMap;
74
use indexmap::IndexSet;
8-
type Map<K, V> = IndexMap<K, V, ahash::ABuildHasher>;
9-
type Set<T> = IndexSet<T, ahash::ABuildHasher>;
5+
use core::hash::BuildHasherDefault;
6+
use twox_hash::XxHash64;
7+
type Map<K, V> = IndexMap<K, V, BuildHasherDefault<XxHash64>>;
8+
type Set<T> = IndexSet<T, BuildHasherDefault<XxHash64>>;
109

1110
use core::iter::FromIterator;
1211

0 commit comments

Comments
 (0)