1
Fork 0

Update methods.rs

Remove unused const
This commit is contained in:
Squirrel 2021-02-15 07:39:15 +00:00 committed by GitHub
parent 17e238d78e
commit d2ba68b24e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,7 +332,6 @@ impl char {
#[inline]
pub fn to_digit(self, radix: u32) -> Option<u32> {
assert!(radix <= 36, "to_digit: radix is too high (maximum 36)");
const ASCII_DIGIT_MASK: u32 = 0b11_0000;
// the code is split up here to improve execution speed for cases where
// the `radix` is constant and 10 or smaller
let val = if likely(radix <= 10) {