From 0d3bdc6c3ec9b237f986bd4b233764f36b8c5bda Mon Sep 17 00:00:00 2001 From: loggerhead Date: Mon, 17 Oct 2016 11:16:36 +0800 Subject: [PATCH] Fix a error of 'book/deref-coercions.html' The original sentence is: > This example has two conversions: `Rc` to `String` and then `String` to `&str`. But it should be > This example has two conversions: `Rc` to `String` and then `String` to `str`. or > This example has two conversions: `&Rc` to `&String` and then `&String` to `&str`. I think the latter is more clearly. --- src/doc/book/deref-coercions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/book/deref-coercions.md b/src/doc/book/deref-coercions.md index beb65c4ce358a..cabe66f5b2282 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`. But we can now pass the `Rc` 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` to `String` and then `String` to `&str`. Rust will do +conversions: `&Rc` 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: