Skip to content

Commit cc4653b

Browse files
committed
Cow::from(&*...) changed to Cow::Owned(Vec::from(...))
1 parent 1a90ad8 commit cc4653b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl Allocation {
370370
}
371371
// Create allocation.
372372
Ok(Allocation {
373-
bytes: AllocBytes::from_bytes(Cow::from(&*bytes), self.align),
373+
bytes: AllocBytes::from_bytes(Cow::Owned(Vec::from(bytes)), self.align),
374374
provenance: ProvenanceMap::from_presorted_ptrs(new_provenance),
375375
init_mask: self.init_mask,
376376
align: self.align,

0 commit comments

Comments
 (0)