From f26b0a29487c6501fa4c14b9b43b3fa0228001ba Mon Sep 17 00:00:00 2001 From: Rune Tynan Date: Wed, 1 Mar 2023 20:27:03 -0500 Subject: [PATCH] Format --- compiler/rustc_middle/src/mir/interpret/allocation.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs index 0628af747fa7d..48375ed301d22 100644 --- a/compiler/rustc_middle/src/mir/interpret/allocation.rs +++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs @@ -42,10 +42,7 @@ pub trait AllocBytes: /// Create a zeroed `AllocBytes` of the specified size and alignment; /// call the callback error handler if there is an error in allocating the memory. - fn zeroed( - size: Size, - _align: Align, - ) -> Option; + fn zeroed(size: Size, _align: Align) -> Option; } // Default `bytes` for `Allocation` is a `Box<[u8]>`. @@ -58,10 +55,7 @@ impl AllocBytes for Box<[u8]> { Box::<[u8]>::from(slice.into()) } - fn zeroed( - size: Size, - _align: Align, - ) -> Option { + fn zeroed(size: Size, _align: Align) -> Option { let bytes = Box::<[u8]>::try_new_zeroed_slice(size.bytes_usize()).ok()?; // SAFETY: the box was zero-allocated, which is a valid initial value for Box<[u8]> let bytes = unsafe { bytes.assume_init() };