Make VecDeque::new_in
unstably const
This commit is contained in:
parent
e0098a5cc3
commit
929003aacf
@ -566,10 +566,9 @@ impl<T, A: Allocator> VecDeque<T, A> {
|
|||||||
///
|
///
|
||||||
/// let deque: VecDeque<u32> = VecDeque::new();
|
/// let deque: VecDeque<u32> = VecDeque::new();
|
||||||
/// ```
|
/// ```
|
||||||
// FIXME: This should probably be const
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||||
pub fn new_in(alloc: A) -> VecDeque<T, A> {
|
pub const fn new_in(alloc: A) -> VecDeque<T, A> {
|
||||||
VecDeque { head: 0, len: 0, buf: RawVec::new_in(alloc) }
|
VecDeque { head: 0, len: 0, buf: RawVec::new_in(alloc) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user