diff options
| author | Jonathan Turner <jonathandturner@users.noreply.github.com> | 2016-08-20 07:09:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-20 07:09:35 -0700 |
| commit | f4b123f05f5ec380e717843f4afd91ac4a798b96 (patch) | |
| tree | f25c0c626cc0a731f4831db7b1f42a46aedc568c | |
| parent | 69612f0039b87e1a31c3cc4c063c19d3536812a9 (diff) | |
| parent | 6976991569977e8097da5f7660a31a42d11e48d2 (diff) | |
| download | rust-f4b123f05f5ec380e717843f4afd91ac4a798b96.tar.gz rust-f4b123f05f5ec380e717843f4afd91ac4a798b96.zip | |
Rollup merge of #35781 - ErikUggeldahl:spellingfix, r=apasel422
Very minor spelling fix in the book Changed datastructure to data structure. r? @steveklabnik
| -rw-r--r-- | src/doc/book/borrow-and-asref.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/book/borrow-and-asref.md b/src/doc/book/borrow-and-asref.md index 1cfeb2620bd..c30b2e68665 100644 --- a/src/doc/book/borrow-and-asref.md +++ b/src/doc/book/borrow-and-asref.md @@ -8,7 +8,7 @@ different. Here’s a quick refresher on what these two traits mean. # Borrow -The `Borrow` trait is used when you’re writing a datastructure, and you want to +The `Borrow` trait is used when you’re writing a data structure, and you want to use either an owned or borrowed type as synonymous for some purpose. For example, [`HashMap`][hashmap] has a [`get` method][get] which uses `Borrow`: @@ -86,7 +86,7 @@ We can see how they’re kind of the same: they both deal with owned and borrowe versions of some type. However, they’re a bit different. Choose `Borrow` when you want to abstract over different kinds of borrowing, or -when you’re building a datastructure that treats owned and borrowed values in +when you’re building a data structure that treats owned and borrowed values in equivalent ways, such as hashing and comparison. Choose `AsRef` when you want to convert something to a reference directly, and |
