I have some value in 0..0x100 as a u{16,32,64,size}, and I want it as a u8 -- is `value as u8` what I want, or is there some other idiom for "convert this to another type"
-
-
Replying to @mountain_ghosts
in stable, 'as' is the one you want. (Nightly has TryFrom)
1 reply 0 retweets 0 likes -
Replying to @fasterthanlime
oh TryFrom is stable now, I thought, but in any case, I know the value fits in a u8 so I just want to truncate it, not do something fallible
2 replies 0 retweets 1 like
Replying to @mountain_ghosts @fasterthanlime
as is what you want then
4:40 PM - 9 Jul 2019
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.