Make some changes we've made upstream

This commit is contained in:
Carol (Nichols || Goulding) 2016-11-23 11:16:40 -05:00
parent effdfa3cda
commit df4625254f
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ Chapter 6) concepts are the building blocks for creating new types in your
programs domain in order to take full advantage of Rusts compile-time type
checking.
One way of thinking about structs is that they are similar to tuples that we
One way of thinking about structs is that they are similar to tuples, which we
talked about in Chapter 3. Like tuples, the pieces of a struct can be different
types. Unlike tuples, we name each piece of data so that its clearer what the
values mean. Structs are more flexible as a result of these names: we dont
@ -60,8 +60,8 @@ wanted just this users email address, we can say `user1.email`.
## An Example Program
To understand when we might want to use structs, lets write a program that
calculates the area of a rectangle. Well start off with single variable
bindings, then refactor our program until were using structs instead.
calculates the area of a rectangle. Well start off with single variables, then
refactor our program until were using structs instead.
Lets make a new binary project with Cargo called *rectangles* that will take
the length and width of a rectangle specified in pixels and will calculate the

Binary file not shown.