diff options
| author | loggerhead <longfangzheng@qq.com> | 2016-10-17 11:16:36 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 11:16:36 +0800 |
| commit | 0d3bdc6c3ec9b237f986bd4b233764f36b8c5bda (patch) | |
| tree | 989e0342a0546fa0246e6a68df9964b9fab15f0c | |
| parent | 6572a463116a31efba8bfddb2e64ed659311b8a1 (diff) | |
| download | rust-0d3bdc6c3ec9b237f986bd4b233764f36b8c5bda.tar.gz rust-0d3bdc6c3ec9b237f986bd4b233764f36b8c5bda.zip | |
Fix a error of 'book/deref-coercions.html'
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.
| -rw-r--r-- | src/doc/book/deref-coercions.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/book/deref-coercions.md b/src/doc/book/deref-coercions.md index beb65c4ce35..cabe66f5b22 100644 --- a/src/doc/book/deref-coercions.md +++ b/src/doc/book/deref-coercions.md @@ -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: |
