Skip to content

Commit

Permalink
doc: compare *vec! macros with vec!
Browse files Browse the repository at this point in the history
  • Loading branch information
bluurryy committed Aug 31, 2024
1 parent a667c68 commit 96c7d0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/bump_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ use crate::{
SupportedMinimumAlignment,
};

/// Creates a [`BumpVec`] containing the arguments.
///
/// `bump_vec!` allows `BumpVec`s to be defined with the same syntax as array expressions. `try` makes the allocations fallible.
/// This is like [`vec!`] but allocates inside a `Bump` or `BumpScope`, returning a [`BumpVec`].
///
/// `$bump` can be a [`Bump`](crate::Bump) or [`BumpScope`] (anything where `$bump.as_scope()` returns a `&BumpScope`).
///
Expand Down
4 changes: 1 addition & 3 deletions src/mut_bump_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ use crate::{
MinimumAlignment, NoDrop, SetLenOnDropByPtr, SizedTypeProperties, Stats, SupportedMinimumAlignment,
};

/// Creates a [`MutBumpVec`] containing the arguments.
///
/// `mut_bump_vec!` allows `MutBumpVec`s to be defined with the same syntax as array expressions. `try` makes the allocations fallible.
/// This is like [`vec!`] but allocates inside a `Bump` or `BumpScope`, returning a [`MutBumpVec`].
///
/// `$bump` can be a mutable [`Bump`](crate::Bump) or [`BumpScope`] (anything where `$bump.as_mut_scope()` returns a `&mut BumpScope`).
///
Expand Down
4 changes: 1 addition & 3 deletions src/mut_bump_vec_rev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ use crate::{
SetLenOnDrop, SizedTypeProperties, Stats, SupportedMinimumAlignment,
};

/// Creates a [`MutBumpVecRev`] containing the arguments.
///
/// `mut_bump_vec_rev!` allows `MutBumpVecRev`s to be defined with the same syntax as array expressions. `try` makes the allocations fallible.
/// This is like [`vec!`] but allocates inside a `Bump` or `BumpScope`, returning a [`MutBumpVecRev`].
///
/// `$bump` can be a mutable [`Bump`](crate::Bump) or [`BumpScope`] (anything where `$bump.as_mut_scope()` returns a `&mut BumpScope`).
///
Expand Down

0 comments on commit 96c7d0e

Please sign in to comment.