Skip to content

Commit

Permalink
doc AVec::allocator: copy from ABox::allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
MaulingMonkey committed Jan 26, 2024
1 parent 932ebe0 commit 98b445f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vec/avec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub struct AVec<T, A: Free> {
impl<T, A: Free> Drop for AVec<T, A> { fn drop(&mut self) { self.clear() } }

impl<T, A: Free> AVec<T, A> {
/// Retrieve the [`fat::Free`] (+ [`fat::Alloc`] + [`fat::Realloc`] + ...) associated with this [`AVec`].
#[inline(always)] pub fn allocator(&self) -> &A { ABox::allocator(&self.data) }

/// Get a pointer to the underlying buffer of `T`s without going through a reference to `T` or `[T]` (which could narrow provenance.)
Expand Down

0 comments on commit 98b445f

Please # to comment.