Skip to content

Commit 235770c

Browse files
committed
Cow::from(&*...) changed to Cow::Owned(Vec::from(...))
1 parent 47e2cc2 commit 235770c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ impl Allocation {
371371
}
372372
// Create allocation.
373373
Ok(Allocation {
374-
bytes: AllocBytes::from_bytes(Cow::from(&*bytes), self.align),
374+
bytes: AllocBytes::from_bytes(Cow::Owned(Vec::from(bytes)), self.align),
375375
provenance: ProvenanceMap::from_presorted_ptrs(new_provenance),
376376
init_mask: self.init_mask,
377377
align: self.align,

0 commit comments

Comments
 (0)