mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
Tweak BufWrite::push
Make it pass the value, not a reference, to more closely match Vec's behavior. It's not a big difference because the type is `Copy`, but still better.
This commit is contained in:
parent
f1d7560b3c
commit
97bc4c4471
|
@ -26,8 +26,8 @@ impl BufWrite {
|
|||
///
|
||||
/// Panics if capacity is inadequate.
|
||||
#[inline]
|
||||
pub fn push(&mut self, item: &impl Pod) {
|
||||
self.push_bytes(bytemuck::bytes_of(item));
|
||||
pub fn push(&mut self, item: impl Pod) {
|
||||
self.push_bytes(bytemuck::bytes_of(&item));
|
||||
}
|
||||
|
||||
/// Extend with a slice of plain data objects.
|
||||
|
|
Loading…
Reference in a new issue