Skip to content

Commit

Permalink
Fix them doc examples some more
Browse files Browse the repository at this point in the history
Apologies for the many attempts, my dev loop for this consists of editing on github, committing, and then waiting for the CI failure log to yell at me.
  • Loading branch information
AljoschaMeyer authored Jul 6, 2024
1 parent be23cef commit ca537d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ impl<T, A: Allocator> Box<[T], A> {
///
/// use std::alloc::System;
///
/// let mut values = Box::<[u32]>::try_new_uninit_slice_in(3, System)?;
/// let mut values = Box::<[u32], _>::try_new_uninit_slice_in(3, System)?;
/// let values = unsafe {
/// // Deferred initialization:
/// values[0].as_mut_ptr().write(1);
Expand Down Expand Up @@ -885,7 +885,7 @@ impl<T, A: Allocator> Box<[T], A> {
///
/// use std::alloc::System;
///
/// let values = Box::<[u32]>::try_new_zeroed_slice_in(3, System)?;
/// let values = Box::<[u32], _>::try_new_zeroed_slice_in(3, System)?;
/// let values = unsafe { values.assume_init() };
///
/// assert_eq!(*values, [0, 0, 0]);
Expand Down

0 comments on commit ca537d2

Please sign in to comment.