You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/types/cast.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ fn main() {
70
70
// nan as u8 is 0
71
71
println!("nan as u8 is {}", f32::NAN as u8);
72
72
73
-
// This behavior incures a small runtime cost and can be avoided with unsafe methods:
73
+
// This behavior incures a small runtime cost and can be avoided with unsafe methods, however the results might overflow and return **unsound values**. Use these methods wisely:
74
74
unsafe {
75
75
// 300.0 is 44
76
76
println!("300.0 is {}", 300.0_f32.to_int_unchecked::<u8>());
0 commit comments