Replace deprecated elements (#10991)

# Objective

- Replace deprecated elements.

## Solution

- Replace 'u8::max_value()' with 'u8::MAX'.
This commit is contained in:
Tygyh 2023-12-16 03:25:12 +01:00 committed by GitHub
parent ca1874e6c6
commit d3e96abadc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()