Add more from the std
This commit is contained in:
@@ -6,7 +6,7 @@ use hashbrown::hash_set as base;
|
||||
use super::map::map_try_reserve_error;
|
||||
use crate::alloc::{Allocator, Global};
|
||||
use crate::borrow::Borrow;
|
||||
use alloc_crate::collections::TryReserveError;
|
||||
use crate::collections::TryReserveError;
|
||||
use crate::fmt;
|
||||
use crate::hash::{BuildHasher, Hash, RandomState};
|
||||
use crate::iter::{Chain, FusedIterator};
|
||||
@@ -231,7 +231,7 @@ impl<T, S> HashSet<T, S> {
|
||||
#[inline]
|
||||
#[must_use]
|
||||
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
|
||||
#[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")]
|
||||
#[rustc_const_unstable(feature = "custom_std", issue = "none")]
|
||||
pub const fn with_hasher(hasher: S) -> HashSet<T, S> {
|
||||
HashSet { base: base::HashSet::with_hasher(hasher) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user