Skip to content

Commit 77beefd

Browse files
committed
Rollup merge of #25257 - dpetersen:mutability-docfix, r=steveklabnik
I think there's a trivial missing word in the Mutability document. I reformatted the resulting paragraph in vim, which seems to match what the rest of the document is doing as far as word wrapping. Edit: I found another minor thing as I continued reading. P.S. I'm re-reading the docs, since so much has changed since my first read, and they've gotten even better! Nice job! r? @steveklabnik
2 parents 39a25cf + ae1b64f commit 77beefd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/doc/trpl/match.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ side of a `let` binding or directly where an expression is used:
5050
```rust
5151
let x = 5;
5252

53-
let numer = match x {
53+
let number = match x {
5454
1 => "one",
5555
2 => "two",
5656
3 => "three",

src/doc/trpl/mutability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ When we call `clone()`, the `Arc<T>` needs to update the reference count. Yet
7878
we’ve not used any `mut`s here, `x` is an immutable binding, and we didn’t take
7979
`&mut 5` or anything. So what gives?
8080

81-
To this, we have to go back to the core of Rust’s guiding philosophy, memory
82-
safety, and the mechanism by which Rust guarantees it, the
81+
To understand this, we have to go back to the core of Rust’s guiding
82+
philosophy, memory safety, and the mechanism by which Rust guarantees it, the
8383
[ownership][ownership] system, and more specifically, [borrowing][borrowing]:
8484

8585
> You may have one or the other of these two kinds of borrows, but not both at

0 commit comments

Comments
 (0)