Skip to content

Commit 43b55cf

Browse files
committed
Simplify allocation creation
1 parent dc1c6c3 commit 43b55cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ impl<Tag> Allocation<Tag> {
130130
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
131131
})?;
132132
bytes.resize(size.bytes_usize(), 0);
133-
bytes.fill(0);
134133
Ok(Allocation {
135-
bytes: bytes,
134+
bytes,
136135
relocations: Relocations::new(),
137136
init_mask: InitMask::new(size, false),
138137
align,

0 commit comments

Comments
 (0)