mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
Add allocator function
This commit is contained in:
@@ -1245,6 +1245,13 @@ pub fn into_vec(self) -> Vec<T, A> {
|
||||
self.into()
|
||||
}
|
||||
|
||||
/// Returns a reference to the underlying allocator.
|
||||
#[unstable(feature = "allocator_api", issue = "32838")]
|
||||
#[inline]
|
||||
pub fn allocator(&self) -> &A {
|
||||
self.data.allocator()
|
||||
}
|
||||
|
||||
/// Returns the length of the binary heap.
|
||||
///
|
||||
/// # Examples
|
||||
|
||||
Reference in New Issue
Block a user