clippy: Fix collapsible_if warnings (#31852)

This commit is contained in:
Oluwatobi Sofela 2024-03-25 14:55:45 +01:00 committed by GitHub
parent 3d10dbae32
commit a53632c0e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 85 additions and 95 deletions

View file

@ -458,10 +458,10 @@ impl WebGLExtensions {
}
pub fn effective_type(&self, type_: u32) -> u32 {
if type_ == OESTextureHalfFloatConstants::HALF_FLOAT_OES {
if !self.supports_gl_extension("GL_OES_texture_half_float") {
return gl::HALF_FLOAT;
}
if type_ == OESTextureHalfFloatConstants::HALF_FLOAT_OES &&
!self.supports_gl_extension("GL_OES_texture_half_float")
{
return gl::HALF_FLOAT;
}
type_
}