diff options
author | tanishka <109246904+taniishkaaa@users.noreply.github.com> | 2024-10-04 10:59:10 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 05:29:10 +0000 |
commit | 03b8034f6805a2ffdd0d44f59461dc3948c62565 (patch) | |
tree | ed675229be77ad25e1fe9d9245ea033cd8ee49e0 /components/webgpu | |
parent | 6e043cd09ed76c0bb4fa92cea2693dc70f42ba52 (diff) | |
download | servo-03b8034f6805a2ffdd0d44f59461dc3948c62565.tar.gz servo-03b8034f6805a2ffdd0d44f59461dc3948c62565.zip |
clippy: Fix several warnings in `components/script` and `components/webgpu` (#33633)
* clippy: Fix several warnings in components
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* fix: Allow upper_case_acronyms
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix more warnings
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
---------
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
Diffstat (limited to 'components/webgpu')
-rw-r--r-- | components/webgpu/swapchain.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/webgpu/swapchain.rs b/components/webgpu/swapchain.rs index bbbe6f9aa1e..ac9c7603a95 100644 --- a/components/webgpu/swapchain.rs +++ b/components/webgpu/swapchain.rs @@ -141,9 +141,9 @@ pub struct WebGPUImageDescriptor(pub ImageDescriptor); impl WebGPUImageDescriptor { fn new(format: ImageFormat, size: DeviceIntSize, is_opaque: bool) -> Self { - let stride = (((size.width * format.bytes_per_pixel()) | + let stride = ((size.width * format.bytes_per_pixel()) | (wgt::COPY_BYTES_PER_ROW_ALIGNMENT as i32 - 1)) + - 1) as i32; + 1; Self(ImageDescriptor { format, size, |