Skip to content

Commit

Permalink
Cow::from(&*...) changed to Cow::Owned(Vec::from(...))
Browse files Browse the repository at this point in the history
  • Loading branch information
Strophox committed May 3, 2024
1 parent 47e2cc2 commit 235770c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/interpret/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ impl Allocation {
}
// Create allocation.
Ok(Allocation {
bytes: AllocBytes::from_bytes(Cow::from(&*bytes), self.align),
bytes: AllocBytes::from_bytes(Cow::Owned(Vec::from(bytes)), self.align),
provenance: ProvenanceMap::from_presorted_ptrs(new_provenance),
init_mask: self.init_mask,
align: self.align,
Expand Down

0 comments on commit 235770c

Please sign in to comment.