3 ms·
In this example you could do: (n >> 16) as u16 There is also this thing called "Infallible". Which will eventually be merged with "!". To express to the co
by bombela 4y ago
In this example you could do:
(n >> 16) as u16
There is also this thing called "Infallible". Which will eventually be merged with "!". To express to the compiler and the programmer that something can never fail.
https://doc.rust-lang.org/std/convert/enum.Infallible.html https://doc.rust-lang.org/std/convert/enum.Infallible.html