I use u8
methods many times without instance, like:
[b'a', b'1', b'2', b'3'].iter().map(u8::is_ascii_digit)
(Edit: This is what I'm doing today, I'm looking for the following paragraph.)
I would like to bring the methods I use into scope, e.g.:
use u8::is_ascii_digit;
But the above code fails with:
error[E0432]: unresolved import `u8`
--> src\liblexer\hot_path\lexer.rs:2:5
|
2 | use u8::is_ascii_digit;
| ^^ help: a similar path exists: `std::u8`
It will also be nice if I could alias them.
Is it possible to achieve with Rust?