[wiggle] Don't make generated structs and unions Copy.
Some structs and unions are large enough that making them `Copy` isn't ideal. wasi-common only needed `Copy` in a few places that were easy to fix. `SubscriptionClock` is 32 bytes, so it's not a bad a idea to pass it by reference anyway.
This commit is contained in:
@@ -95,7 +95,7 @@ impl AsBytes for types::Dirent {
|
||||
let mut bytes: Vec<u8> = Vec::with_capacity(offset);
|
||||
bytes.resize(offset, 0);
|
||||
let ptr = bytes.as_mut_ptr() as *mut Self;
|
||||
unsafe { ptr.write_unaligned(*self) };
|
||||
unsafe { ptr.write_unaligned(self.clone()) };
|
||||
Ok(bytes)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user