Skip to content

Commit e0f404c

Browse files
committed
use feature(hasher_prefixfree_extras)
1 parent 95ffed3 commit e0f404c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ default = ["default-hasher", "inline-more", "allocator-api2", "equivalent", "raw
4747

4848
# Enables use of nightly features. This is only guaranteed to work on the latest
4949
# version of nightly Rust.
50-
nightly = ["bumpalo/allocator_api"]
50+
nightly = ["foldhash?/nightly", "bumpalo/allocator_api"]
5151

5252
# Enables the RustcEntry API used to provide the standard library's Entry API.
5353
rustc-internal-api = []

src/hasher.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ impl Hasher for DefaultHasher {
6363
write_isize(isize),
6464
}
6565

66+
// feature(hasher_prefixfree_extras)
67+
#[cfg(feature = "nightly")]
68+
forward_writes! {
69+
write_length_prefix(usize),
70+
write_str(&str),
71+
}
72+
6673
#[inline(always)]
6774
fn finish(&self) -> u64 {
6875
self.inner.finish()

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
all(feature = "nightly", target_arch = "loongarch64"),
4747
feature(stdarch_loongarch)
4848
)]
49+
#![cfg_attr(
50+
all(feature = "nightly", feature = "default-hasher"),
51+
feature(hasher_prefixfree_extras)
52+
)]
4953

5054
#[cfg(test)]
5155
#[macro_use]

0 commit comments

Comments
 (0)