Skip to content

Commit

Permalink
Run formatter on alloc/src/boxed.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
AljoschaMeyer authored Jul 6, 2024
1 parent c3b602a commit 8d01996
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ impl<T, A: Allocator> Box<[T], A> {
///
/// ```
/// #![feature(allocator_api, new_uninit)]
///
///
/// use std::alloc::System;
///
/// let mut values = Box::<[u32]>::try_new_uninit_slice(3, System)?;
Expand All @@ -856,7 +856,10 @@ impl<T, A: Allocator> Box<[T], A> {
/// ```
#[unstable(feature = "allocator_api", issue = "32838")]
#[inline]
pub fn try_new_uninit_slice_in(len: usize, alloc: A) -> Result<Box<[mem::MaybeUninit<T>], A>, AllocError> {
pub fn try_new_uninit_slice_in(
len: usize,
alloc: A,
) -> Result<Box<[mem::MaybeUninit<T>], A>, AllocError> {
let ptr = if T::IS_ZST || len == 0 {
NonNull::dangling()
} else {
Expand All @@ -879,7 +882,7 @@ impl<T, A: Allocator> Box<[T], A> {
///
/// ```
/// #![feature(allocator_api, new_uninit)]
///
///
/// use std::alloc::System;
///
/// let values = Box::<[u32]>::try_new_zeroed_slice(3, System)?;
Expand All @@ -892,7 +895,10 @@ impl<T, A: Allocator> Box<[T], A> {
/// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "allocator_api", issue = "32838")]
#[inline]
pub fn try_new_zeroed_slice_in(len: usize, alloc: A) -> Result<Box<[mem::MaybeUninit<T>], A>, AllocError> {
pub fn try_new_zeroed_slice_in(
len: usize,
alloc: A,
) -> Result<Box<[mem::MaybeUninit<T>], A>, AllocError> {
let ptr = if T::IS_ZST || len == 0 {
NonNull::dangling()
} else {
Expand Down

0 comments on commit 8d01996

Please sign in to comment.