Cow::from(&*...) changed to Cow::Owned(Vec::from(...))

This commit is contained in:
Strophox 2024-04-28 21:40:21 +02:00
parent 47e2cc2ea1
commit 235770c851

View File

@ -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,