You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should warn on code like u8::max as usize, or similar code with min or with other integer types.
Advantage
u8::MAX is a constant equal to 2^8-1. u8::MAX as usize casts that value to a larger integer size.
u8::max is a function that takes two u8 values and returns the larger one. u8::max as usize takes the address of that function, which is almost certainly not intended.