1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

refactor: replace ahash with foldhash (#3483)

This commit is contained in:
Rob Ede
2024-12-29 16:20:00 +00:00
committed by GitHub
parent 8200e4ee82
commit ac2a3bb124
6 changed files with 12 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
use std::{borrow::Cow, collections::hash_map, iter, ops};
use ahash::AHashMap;
use foldhash::{HashMap as FoldHashMap, HashMapExt as _};
use http::header::{HeaderName, HeaderValue};
use smallvec::{smallvec, SmallVec};
@@ -47,7 +47,7 @@ use super::AsHeaderName;
/// ```
#[derive(Debug, Clone, Default)]
pub struct HeaderMap {
pub(crate) inner: AHashMap<HeaderName, Value>,
pub(crate) inner: FoldHashMap<HeaderName, Value>,
}
/// A bespoke non-empty list for HeaderMap values.
@@ -116,7 +116,7 @@ impl HeaderMap {
/// ```
pub fn with_capacity(capacity: usize) -> Self {
HeaderMap {
inner: AHashMap::with_capacity(capacity),
inner: FoldHashMap::with_capacity(capacity),
}
}