Skip to content

Commit

Permalink
Fix a error of 'book/deref-coercions.html'
Browse files Browse the repository at this point in the history
The original sentence is:

> This example has two conversions: `Rc<String>` to `String` and then `String` to `&str`. 

But it should be

> This example has two conversions: `Rc<String>` to `String` and then `String` to `str`. 

or 

> This example has two conversions: `&Rc<String>` to `&String` and then `&String` to `&str`. 

I think the latter is more clearly.
  • Loading branch information
loggerhead authored Oct 17, 2016
1 parent 6572a46 commit 0d3bdc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/book/deref-coercions.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ foo(&counted);
All we’ve done is wrap our `String` in an `Rc<T>`. But we can now pass the
`Rc<String>` around anywhere we’d have a `String`. The signature of `foo`
didn’t change, but works just as well with either type. This example has two
conversions: `Rc<String>` to `String` and then `String` to `&str`. Rust will do
conversions: `&Rc<String>` to `&String` and then `&String` to `&str`. Rust will do
this as many times as possible until the types match.

Another very common implementation provided by the standard library is:
Expand Down

0 comments on commit 0d3bdc6

Please sign in to comment.