Merge pull request #202 from ykomatsu/enum

Fix a typo
This commit is contained in:
Carol (Nichols || Goulding)
2016-08-19 10:41:53 -04:00
committed by GitHub
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -3,9 +3,10 @@
A `struct`, short for "structure", gives us the ability to name and package A `struct`, short for "structure", gives us the ability to name and package
together multiple related values that make up a meaningful group. If you come together multiple related values that make up a meaningful group. If you come
from an object-oriented language, a `struct` is like an object's data from an object-oriented language, a `struct` is like an object's data
attributes. `struct` and `enum` (that we talked about in the last chapter) are attributes. `struct` and `enum` (that we will talk about in the next chapter)
the building blocks you can use in Rust to create new types in your program's are the building blocks you can use in Rust to create new types in your
domain in order to take full advantage of Rust's compile-time type checking. program's domain in order to take full advantage of Rust's compile-time type
checking.
Let’s write a program which calculates the distance between two points. Let’s write a program which calculates the distance between two points.
We’ll start off with single variable bindings, and then refactor it to We’ll start off with single variable bindings, and then refactor it to
+4 -3
View File
@@ -3,9 +3,10 @@
A `struct`, short for "structure", gives us the ability to name and package A `struct`, short for "structure", gives us the ability to name and package
together multiple related values that make up a meaningful group. If you come together multiple related values that make up a meaningful group. If you come
from an object-oriented language, a `struct` is like an object's data from an object-oriented language, a `struct` is like an object's data
attributes. `struct` and `enum` (that we talked about in the last chapter) are attributes. `struct` and `enum` (that we will talk about in the next chapter)
the building blocks you can use in Rust to create new types in your program's are the building blocks you can use in Rust to create new types in your
domain in order to take full advantage of Rust's compile-time type checking. program's domain in order to take full advantage of Rust's compile-time type
checking.
Let’s write a program which calculates the distance between two points. Let’s write a program which calculates the distance between two points.
We’ll start off with single variable bindings, and then refactor it to We’ll start off with single variable bindings, and then refactor it to