Skip to content

Commit

Permalink
Add #[unstable] on new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
a1phyr committed Jul 23, 2021
1 parent 6fcc62b commit 19318e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/collections/vec_deque/mod.rs
Expand Up @@ -496,7 +496,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
/// let vector: VecDeque<u32> = VecDeque::new();
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[unstable(feature = "allocator_api", issue = "32838")]
pub fn new_in(alloc: A) -> VecDeque<T, A> {
VecDeque::with_capacity_in(INITIAL_CAPACITY, alloc)
}
Expand All @@ -510,7 +510,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
///
/// let vector: VecDeque<u32> = VecDeque::with_capacity(10);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[unstable(feature = "allocator_api", issue = "32838")]
pub fn with_capacity_in(capacity: usize, alloc: A) -> VecDeque<T, A> {
// +1 since the ringbuffer always leaves one space empty
let cap = cmp::max(capacity + 1, MINIMUM_CAPACITY + 1).next_power_of_two();
Expand Down

0 comments on commit 19318e6

Please sign in to comment.