Skip to content

Commit

Permalink
Rollup merge of rust-lang#35781 - ErikUggeldahl:spellingfix, r=apasel422
Browse files Browse the repository at this point in the history
Very minor spelling fix in the book

Changed datastructure to data structure.

r? @steveklabnik
  • Loading branch information
Jonathan Turner committed Aug 20, 2016
2 parents fe5f685 + 6976991 commit b78e540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/borrow-and-asref.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b78e540

Please sign in to comment.