File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ different. Here’s a quick refresher on what these two traits mean.
88
99# Borrow
1010
11- The ` Borrow ` trait is used when you’re writing a datastructure , and you want to
11+ The ` Borrow ` trait is used when you’re writing a data structure , and you want to
1212use either an owned or borrowed type as synonymous for some purpose.
1313
1414For 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
8686versions of some type. However, they’re a bit different.
8787
8888Choose ` Borrow ` when you want to abstract over different kinds of borrowing, or
89- when you’re building a datastructure that treats owned and borrowed values in
89+ when you’re building a data structure that treats owned and borrowed values in
9090equivalent ways, such as hashing and comparison.
9191
9292Choose ` AsRef ` when you want to convert something to a reference directly, and
You can’t perform that action at this time.
0 commit comments