File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Const: max_value
16
16
17
17
Return the maximal value for a u32
18
18
*/
19
- const max_value: u32 = 0xffff_ffffu32 ;
19
+ const max_value: u32 = 0u32 - 1u32 ;
20
20
21
21
pure fn min ( x : u32 , y : u32 ) -> u32 { if x < y { x } else { y } }
22
22
pure fn max ( x : u32 , y : u32 ) -> u32 { if x > y { x } else { y } }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Const: max_value
16
16
17
17
Return the maximal value for a u64
18
18
*/
19
- const max_value: u64 = 18446744073709551615u64 ;
19
+ const max_value: u64 = 0u64 - 1u64 ;
20
20
21
21
pure fn min ( x : u64 , y : u64 ) -> u64 { if x < y { x } else { y } }
22
22
pure fn max ( x : u64 , y : u64 ) -> u64 { if x > y { x } else { y } }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Const: max_value
16
16
17
17
The maximum value of a u8.
18
18
*/
19
- const max_value: u8 = 255u8 ;
19
+ const max_value: u8 = 0u8 - 1u8 ;
20
20
21
21
/* Function: add */
22
22
pure fn add ( x : u8 , y : u8 ) -> u8 { ret x + y; }
You can’t perform that action at this time.
0 commit comments