Make BTreeSet::new_in const

This commit is contained in:
Sven Bartscher 2023-10-09 11:17:56 +02:00
parent bbc230478c
commit d60b43c06a

View File

@ -358,7 +358,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
/// let mut set: BTreeSet<i32> = BTreeSet::new_in(Global); /// let mut set: BTreeSet<i32> = BTreeSet::new_in(Global);
/// ``` /// ```
#[unstable(feature = "btreemap_alloc", issue = "32838")] #[unstable(feature = "btreemap_alloc", issue = "32838")]
pub fn new_in(alloc: A) -> BTreeSet<T, A> { pub const fn new_in(alloc: A) -> BTreeSet<T, A> {
BTreeSet { map: BTreeMap::new_in(alloc) } BTreeSet { map: BTreeMap::new_in(alloc) }
} }