Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very minor spelling fix in the book #35781

Merged
merged 1 commit into from
Aug 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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