Y
Hacker News
new
|
ask
|
show
|
jobs
by
kd5bjo
2169 days ago
It looks like ‘as’ is generally defined as a truncating cast operator for other numeric types. Since it doesn’t panic for other overflow situations (like u64->u32), they chose consistency with those cases.
https://github.com/rust-lang/rust/issues/10184#issuecomment-...