diff options
| author | Sven Bartscher <sven.bartscher@netapp.com> | 2023-10-09 11:17:56 +0200 |
|---|---|---|
| committer | Sven Bartscher <sven.bartscher@netapp.com> | 2023-10-09 11:17:56 +0200 |
| commit | d60b43c06aad0b181b72ba5ed389961436ac1609 (patch) | |
| tree | e2116921f4dcb2d3c38d72e22cfba0ce5f03bedc | |
| parent | bbc230478c5a282a83592830dc338407ed9804eb (diff) | |
| download | rust-d60b43c06aad0b181b72ba5ed389961436ac1609.tar.gz rust-d60b43c06aad0b181b72ba5ed389961436ac1609.zip | |
Make BTreeSet::new_in const
| -rw-r--r-- | library/alloc/src/collections/btree/set.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 9da230915b8..0e03551286e 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -358,7 +358,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> { /// let mut set: BTreeSet<i32> = BTreeSet::new_in(Global); /// ``` #[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) } } |
