Fix trivial issues

This commit is contained in:
Yoshito Komatsu 2016-12-13 15:09:00 +09:00
parent 2e2e1a1d74
commit d05b7c63ff
2 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@ the scope of this book).
Each signed variant can store numbers from -(2<sup>n - 1</sup>) to 2<sup>n -
1</sup> - 1 inclusive, where `n` is the number of bits that variant uses. So an
`i8` can store numbers from -(2<sup>7</sup>) to 2<sup>7</sup>, which equals
`i8` can store numbers from -(2<sup>7</sup>) to 2<sup>7</sup> - 1, which equals
-128 to 127. Unsigned variants can store numbers from 0 to 2<sup>n</sup> - 1,
so a `u8` can store numbers from 0 to 2<sup>8</sup> - 1, which equals 0 to 255.

View File

@ -35,12 +35,12 @@ condition. In this case, the condition checks whether or not the variable
condition is true is placed immediately after the condition inside curly
braces. Blocks of code associated with the conditions in `if` expressions are
sometimes called *arms*, just like the arms in `match` expressions that we
discussed in the “Comparing the Guess to the Secret Number” section of Chapter
2. Optionally, we can also include an `else` expression, which we chose to do
here, to give the program an alternative block of code to execute should the
condition evaluate to false. If you dont provide an `else` expression and the
condition is false, the program will just skip the `if` block and move on to
the next bit of code.
discussed in the “Comparing the Guess to the Secret Number” section of
Chapter 2. Optionally, we can also include an `else` expression, which we chose
to do here, to give the program an alternative block of code to execute should
the condition evaluate to false. If you dont provide an `else` expression and
the condition is false, the program will just skip the `if` block and move on
to the next bit of code.
Try running this code; you should see the following output: