clippy: Fix unnecessary_cast warnings in components/script (#31823)

* clippy: Fix unnecessary cast warnings

* clippy: Replace redundant field names with their shorthand alternatives

* clippy: Delete struct pattern dereferencings
This commit is contained in:
Oluwatobi Sofela 2024-03-22 14:48:03 +01:00 committed by GitHub
parent 3e9b808938
commit bae77671f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 32 additions and 45 deletions

View file

@ -765,7 +765,7 @@ impl<'a> WebGLValidator for TexStorageValidator<'a> {
return Err(TexImageValidationError::InvalidTextureFormat);
}
let max_level = log2(cmp::max(width, height) as u32) + 1;
let max_level = log2(cmp::max(width, height)) + 1;
if level > max_level {
context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::LevelTooHigh);