Skip to content

Commit fcde9cc

Browse files
committed
Replace ahash with foldhash
1 parent cad6cc9 commit fcde9cc

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ indexmap = { version = "2.6", default-features = false }
4242
log = { version = "0.4.22" }
4343
zerocopy = { version = "0.8.3", features = ["derive"] }
4444
debug-ignore = { version = "1.0" }
45-
ahash = { version = "0.8.11", default-features = false, features = ["compile-time-rng"] }
45+
foldhash = { version = "0.2.0", default-features = false }
4646

4747
image = { version = "0.25.2", default-features = false, optional = true, features = ["ico"] }
4848
thiserror = { version = "2.0", optional = true }

src/image.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use alloc::{borrow::Cow, string::ToString, vec::Vec};
66

7-
use ahash::RandomState;
7+
use foldhash::fast::RandomState;
88
use indexmap::IndexMap;
99
use log::{debug, error, info, warn};
1010
use zerocopy::IntoBytes;
@@ -144,7 +144,9 @@ impl<'a> Image<'a> {
144144

145145
debug!("optional_header_dd_offset: {:#x?}", optional_header_dd_offset,);
146146
let mut header_data_directory =
147-
IndexMap::<DataDirectoryType, ImageDataDirectory, _>::with_hasher(RandomState::new());
147+
IndexMap::<DataDirectoryType, ImageDataDirectory, _>::with_hasher(
148+
RandomState::default(),
149+
);
148150
use DataDirectoryType::*;
149151
for (index, &header) in [
150152
ExportTable,

src/resource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use alloc::{
99
};
1010
use core::{borrow::Borrow, cmp::Ordering, iter, mem::size_of};
1111

12-
use ahash::RandomState;
1312
use debug_ignore::DebugIgnore;
13+
use foldhash::fast::RandomState;
1414
use indexmap::{IndexMap, IndexSet};
1515
use log::{error, trace, warn};
1616
use zerocopy::IntoBytes;

0 commit comments

Comments
 (0)