Skip to content

Commit f26b0a2

Browse files
committed
Format
1 parent 3a87a18 commit f26b0a2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

compiler/rustc_middle/src/mir/interpret/allocation.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ pub trait AllocBytes:
4242

4343
/// Create a zeroed `AllocBytes` of the specified size and alignment;
4444
/// call the callback error handler if there is an error in allocating the memory.
45-
fn zeroed(
46-
size: Size,
47-
_align: Align,
48-
) -> Option<Self>;
45+
fn zeroed(size: Size, _align: Align) -> Option<Self>;
4946
}
5047

5148
// Default `bytes` for `Allocation` is a `Box<[u8]>`.
@@ -58,10 +55,7 @@ impl AllocBytes for Box<[u8]> {
5855
Box::<[u8]>::from(slice.into())
5956
}
6057

61-
fn zeroed(
62-
size: Size,
63-
_align: Align,
64-
) -> Option<Self> {
58+
fn zeroed(size: Size, _align: Align) -> Option<Self> {
6559
let bytes = Box::<[u8]>::try_new_zeroed_slice(size.bytes_usize()).ok()?;
6660
// SAFETY: the box was zero-allocated, which is a valid initial value for Box<[u8]>
6761
let bytes = unsafe { bytes.assume_init() };

0 commit comments

Comments
 (0)