From 47916e0800508d45abcb5515ea6c2d77b4327d77 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 29 Dec 2024 16:04:16 +0000 Subject: [PATCH] chore: use ext fns --- actix-http/src/header/map.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/actix-http/src/header/map.rs b/actix-http/src/header/map.rs index b77bb1c67..a9a201e1a 100644 --- a/actix-http/src/header/map.rs +++ b/actix-http/src/header/map.rs @@ -1,12 +1,8 @@ //! A multi-value [`HeaderMap`] and its iterators. -use std::{ - borrow::Cow, - collections::{hash_map, HashMap}, - iter, ops, -}; +use std::{borrow::Cow, collections::hash_map, iter, ops}; -use foldhash::HashMap as FoldHashMap; +use foldhash::{HashMap as FoldHashMap, HashMapExt as _}; use http::header::{HeaderName, HeaderValue}; use smallvec::{smallvec, SmallVec}; @@ -120,10 +116,7 @@ impl HeaderMap { /// ``` pub fn with_capacity(capacity: usize) -> Self { HeaderMap { - inner: HashMap::with_capacity_and_hasher( - capacity, - foldhash::fast::RandomState::default(), - ), + inner: FoldHashMap::with_capacity(capacity), } }