From d3e96abadccb5198aa108061e1e888e80ca3ff7e Mon Sep 17 00:00:00 2001 From: Tygyh <32486062+tygyh@users.noreply.github.com> Date: Sat, 16 Dec 2023 03:25:12 +0100 Subject: [PATCH] Replace deprecated elements (#10991) # Objective - Replace deprecated elements. ## Solution - Replace 'u8::max_value()' with 'u8::MAX'. --- crates/bevy_render/src/color/colorspace.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/color/colorspace.rs b/crates/bevy_render/src/color/colorspace.rs index 5ef92f1b5b..362a25d2a4 100644 --- a/crates/bevy_render/src/color/colorspace.rs +++ b/crates/bevy_render/src/color/colorspace.rs @@ -235,8 +235,8 @@ mod test { #[test] fn srgb_linear_full_roundtrip() { - let u8max: f32 = u8::max_value() as f32; - for color in 0..u8::max_value() { + let u8max: f32 = u8::MAX as f32; + for color in 0..u8::MAX { let color01 = color as f32 / u8max; let color_roundtrip = color01 .linear_to_nonlinear_srgb()