Skip to content

Commit dfe0c5c

Browse files
authored
Merge pull request #1521 from leg0/128-as-i8-fix
Update cast.md
2 parents bf8d34c + 2e5e64e commit dfe0c5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/types/cast.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ fn main() {
5252
5353
// Unless it already fits, of course.
5454
println!(" 128 as a i16 is: {}", 128 as i16);
55-
// 128 as u8 -> 128, whose two's complement in eight bits is:
55+
56+
// 128 as u8 -> -128, whose two's complement in eight bits is:
5657
println!(" 128 as a i8 is : {}", 128 as i8);
5758
5859
// repeating the example above

0 commit comments

Comments
 (0)