Fixe some clippy warnings (#32131)

This commit is contained in:
komuhangi 2024-04-29 15:22:30 +03:00 committed by GitHub
parent d490fdf83c
commit 5a4c81f841
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 36 deletions

View file

@ -61,27 +61,24 @@ impl Clone for HTMLCanvasElementOrOffscreenCanvas {
impl malloc_size_of::MallocSizeOf for GPUTextureDescriptor {
fn size_of(&self, ops: &mut malloc_size_of::MallocSizeOfOps) -> usize {
match self {
Self {
parent,
dimension,
format,
mipLevelCount,
sampleCount,
size,
usage,
viewFormats,
} => {
parent.size_of(ops) +
dimension.size_of(ops) +
format.size_of(ops) +
mipLevelCount.size_of(ops) +
sampleCount.size_of(ops) +
size.size_of(ops) +
usage.size_of(ops) +
viewFormats.size_of(ops)
},
}
let Self {
parent,
dimension,
format,
mipLevelCount,
sampleCount,
size,
usage,
viewFormats,
} = self;
parent.size_of(ops) +
dimension.size_of(ops) +
format.size_of(ops) +
mipLevelCount.size_of(ops) +
sampleCount.size_of(ops) +
size.size_of(ops) +
usage.size_of(ops) +
viewFormats.size_of(ops)
}
}