Make description of Borrow trait uses match the example.

This commit is contained in:
Jim Blandy 2015-05-15 12:44:24 -07:00
parent b948d81c44
commit 0b04b17183

View file

@ -47,9 +47,9 @@ This is because the standard library has `impl Borrow<str> for String`.
For most types, when you want to take an owned or borrowed type, a `&T` is
enough. But one area where `Borrow` is effective is when theres more than one
kind of borrowed value. Slices are an area where this is especially true: you
can have both an `&[T]` or a `&mut [T]`. If we wanted to accept both of these
types, `Borrow` is up for it:
kind of borrowed value. This is especially true of references and slices: you
can have both an `&T` or a `&mut T`. If we wanted to accept both of these types,
`Borrow` is up for it:
```
use std::borrow::Borrow;