pub const MAX: char = char::MAX; // '\u{10ffff}'
The highest valid code point a char can have, '\u{10FFFF}'. Use char::MAX instead.
char
'\u{10FFFF}'
char::MAX