Fix lints by clippy

This commit is contained in:
Héctor Ramón Jiménez 2022-11-03 04:53:27 +01:00
parent edce457365
commit 7e22e2d452
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
9 changed files with 20 additions and 28 deletions

View file

@ -57,8 +57,7 @@ impl<T: Pod + Zeroable> StaticBuffer<T> {
/// Returns whether or not the buffer needs to be recreated. This can happen whenever mesh data
/// changes & a redraw is requested.
pub fn resize(&mut self, device: &wgpu::Device, new_count: usize) -> bool {
let size =
wgpu::BufferAddress::from((mem::size_of::<T>() * new_count) as u64);
let size = (mem::size_of::<T>() * new_count) as u64;
if self.size < size {
self.offsets.clear();