Skip to content

Commit

Permalink
doc: fix bump_vec::Splice docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bluurryy committed Oct 19, 2024
1 parent 1f1bfba commit 59e42c9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/bump_vec/splice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ use super::Drain;

macro_rules! splice_declaration {
($($allocator_parameter:tt)*) => {
/// A splicing iterator for `Vec`.
/// A splicing iterator for `BumpVec`.
///
/// This struct is created by [`Vec::splice()`].
/// This struct is created by [`BumpVec::splice()`].
/// See its documentation for more.
///
/// # Example
///
/// ```
/// let mut v = vec![0, 1, 2];
/// # use bump_scope::{ Bump, bump_vec };
/// # let bump: Bump = Bump::new();
/// let mut v = bump_vec![in bump; 0, 1, 2];
/// let new = [7, 8];
/// let iter: std::vec::Splice<'_, _> = v.splice(1.., new);
/// let old = bump.alloc_iter_exact(v.splice(1.., new));
/// assert_eq!(old, [1, 2]);
/// assert_eq!(v, [0, 7, 8]);
/// ```
#[derive(Debug)]
pub struct Splice<
Expand Down

0 comments on commit 59e42c9

Please sign in to comment.