aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgltexture.rs
diff options
context:
space:
mode:
authorkomuhangi <51232461+jahielkomu@users.noreply.github.com>2024-04-19 11:48:01 +0300
committerGitHub <noreply@github.com>2024-04-19 08:48:01 +0000
commit007a72fe4de1901feec920e7ca995bbe8f56ef48 (patch)
treeb91cb5d2ca461554852968fbe36eb5684585ade4 /components/script/dom/webgltexture.rs
parentf70413baba624751c76df97d269bdb9fa0bf3495 (diff)
downloadservo-007a72fe4de1901feec920e7ca995bbe8f56ef48.tar.gz
servo-007a72fe4de1901feec920e7ca995bbe8f56ef48.zip
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
Diffstat (limited to 'components/script/dom/webgltexture.rs')
-rw-r--r--components/script/dom/webgltexture.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs
index 911943d4b84..7f26e822233 100644
--- a/components/script/dom/webgltexture.rs
+++ b/components/script/dom/webgltexture.rs
@@ -326,7 +326,7 @@ impl WebGLTexture {
},
EXTTextureFilterAnisotropicConstants::TEXTURE_MAX_ANISOTROPY_EXT => {
// NaN is not less than 1., what a time to be alive.
- if !(float_value >= 1.) {
+ if float_value < 1. || !float_value.is_normal() {
return Err(WebGLError::InvalidValue);
}
self.upcast::<WebGLObject>()