chore: use ext fns

This commit is contained in:
Rob Ede 2024-12-29 16:04:16 +00:00
parent e284e0d645
commit 47916e0800
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 3 additions and 10 deletions

View File

@ -1,12 +1,8 @@
//! A multi-value [`HeaderMap`] and its iterators. //! A multi-value [`HeaderMap`] and its iterators.
use std::{ use std::{borrow::Cow, collections::hash_map, iter, ops};
borrow::Cow,
collections::{hash_map, HashMap},
iter, ops,
};
use foldhash::HashMap as FoldHashMap; use foldhash::{HashMap as FoldHashMap, HashMapExt as _};
use http::header::{HeaderName, HeaderValue}; use http::header::{HeaderName, HeaderValue};
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
@ -120,10 +116,7 @@ impl HeaderMap {
/// ``` /// ```
pub fn with_capacity(capacity: usize) -> Self { pub fn with_capacity(capacity: usize) -> Self {
HeaderMap { HeaderMap {
inner: HashMap::with_capacity_and_hasher( inner: FoldHashMap::with_capacity(capacity),
capacity,
foldhash::fast::RandomState::default(),
),
} }
} }