aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas
diff options
context:
space:
mode:
authorAshwin Naren <arihant2math@gmail.com>2024-08-12 22:16:47 -0700
committerGitHub <noreply@github.com>2024-08-13 05:16:47 +0000
commitea5cf751696ec8c24e7303b042d534a32c2a9a24 (patch)
tree129e271d215d0168002524f4149b73d0925f8766 /components/canvas
parent0d137d276a3a2ad3749750c0e34ebbfd91511106 (diff)
downloadservo-ea5cf751696ec8c24e7303b042d534a32c2a9a24.tar.gz
servo-ea5cf751696ec8c24e7303b042d534a32c2a9a24.zip
clippy: Fix various clippy warnings throughout the code (#33003)
* replace u64::max_value() with u64::MAX Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed redundant import Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed a probable bug Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * dereference formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed excess borrow Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * ran mach fmt Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed doc comment Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed deref on an immutable reference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed minor syntax error Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted clamping Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted final clamp Signed-off-by: Ashwin Naren <arihant2math@gmail.com> --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Ashwin Naren <ashwin@pixelators.org>
Diffstat (limited to 'components/canvas')
-rw-r--r--components/canvas/webgl_thread.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 1ab3ce95bb3..95cd5758586 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -2878,8 +2878,8 @@ fn flip_pixels_y(
// Clamp a size to the current GL context's max viewport
fn clamp_viewport(gl: &Gl, size: Size2D<u32>) -> Size2D<u32> {
- let mut max_viewport = [i32::max_value(), i32::max_value()];
- let mut max_renderbuffer = [i32::max_value()];
+ let mut max_viewport = [i32::MAX, i32::MAX];
+ let mut max_renderbuffer = [i32::MAX];
#[allow(unsafe_code)]
unsafe {
gl.get_integer_v(gl::MAX_VIEWPORT_DIMS, &mut max_viewport);