Fixed some clippy warnings in components (#32107)

* Fixed some clippy warnings in components

* Updated handling of NaN values in comparison

* Updated formatting using ./mach fmt
This commit is contained in:
komuhangi 2024-04-19 11:48:01 +03:00 committed by GitHub
parent f70413baba
commit 007a72fe4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 20 additions and 29 deletions

View file

@ -2953,7 +2953,8 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
}
if pbo_offset < 0 || pbo_offset as usize > pixel_unpack_buffer.capacity() {
return Ok(self.base.webgl_error(InvalidValue));
self.base.webgl_error(InvalidValue);
return Ok(());
}
let unpacking_alignment = self.base.texture_unpacking_alignment();
@ -4119,7 +4120,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
handle_potential_webgl_error!(
self.base,
program.get_uniform_block_index(block_name),
return constants::INVALID_INDEX
constants::INVALID_INDEX
)
}