Skip to content

Commit b014039

Browse files
abengaabenga-gro
authored andcommitted
Minor changes to variable bindings chapter
* In "... name as another binding, that's currently in scope, will ...", ", that's currently in scope, " is not a parenthetical element, and the commas can be omitted. * Other minor changes.
1 parent 763f923 commit b014039

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/doc/book/variable-bindings.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ of our minds as we go forward.
3737
Rust is a statically typed language, which means that we specify our types up
3838
front, and they’re checked at compile time. So why does our first example
3939
compile? Well, Rust has this thing called ‘type inference’. If it can figure
40-
out what the type of something is, Rust doesn’t require you to actually type it
41-
out.
40+
out what the type of something is, Rust doesn’t require you to explicitly type
41+
it out.
4242

4343
We can add the type if we want to, though. Types come after a colon (`:`):
4444

@@ -159,8 +159,9 @@ error: aborting due to previous error
159159
Could not compile `hello_world`.
160160
```
161161

162-
Rust will not let us use a value that has not been initialized. Next, let’s
163-
talk about this stuff we've added to `println!`.
162+
Rust will not let us use a value that has not been initialized.
163+
164+
Let take a minute to talk about this stuff we've added to `println!`.
164165

165166
If you include two curly braces (`{}`, some call them moustaches...) in your
166167
string to print, Rust will interpret this as a request to interpolate some sort
@@ -222,8 +223,8 @@ To learn more, run the command again with --verbose.
222223
```
223224
224225
Additionally, variable bindings can be shadowed. This means that a later
225-
variable binding with the same name as another binding, that's currently in
226-
scope, will override the previous binding.
226+
variable binding with the same name as another binding that is currently in
227+
scope will override the previous binding.
227228
228229
```rust
229230
let x: i32 = 8;

0 commit comments

Comments
 (0)