Skip to content

zv: Use `std::{i,u}*:MAX` over `{i,u}*::MAX`

Use the MAX constant from the std library, like std::u8::MAX and not the associated consts, like u8::MAX. The associated consts were only introduced with 1.43.0 whereas the std ones are 1.0.0.

I wasn't actually able to verify the solution because various other compiler errors popped up using Debian 10 rustc 1.41.1+dfsg1-1~deb10u1. It's difficult to maintain a minimum Rust version, it seems.

Distros are basically forced to upgrade if they want to maintain a package written in Rust anyway. In the case of Debian I know they have to break their stable package update rules already for browsers like Firefox and Chromium to get security updates. If those applications also require newer build deps they have to bend to that as well now, which is more prevalent with Rust since it's still under heavier development. I am pretty sure Debian 10 didn't start out with v1.41.1, for example.

Closes #91 (closed).

Merge request reports