about summary refs log tree commit diff
diff options
context:
space:
mode:
authorXmasreturns <Xmasreturns@users.noreply.github.com>2015-12-09 10:07:02 -0800
committerXmasreturns <Xmasreturns@users.noreply.github.com>2015-12-09 10:07:02 -0800
commit99fdf3414fcba41cbaabadeb780d9c0c42c0e929 (patch)
treed664158fae90b47dc21e1119a9387918615e671a
parenteebf6743d88509412308553e7172e89157f9b981 (diff)
downloadrust-99fdf3414fcba41cbaabadeb780d9c0c42c0e929.tar.gz
rust-99fdf3414fcba41cbaabadeb780d9c0c42c0e929.zip
Grammar changes for readability
-rw-r--r--src/doc/book/enums.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/doc/book/enums.md b/src/doc/book/enums.md
index 8ad4eeedd18..e17d3f762b9 100644
--- a/src/doc/book/enums.md
+++ b/src/doc/book/enums.md
@@ -1,7 +1,8 @@
 % Enums
 
-An `enum` in Rust is a type that represents data that could be one of
-several possible variants:
+An `enum` in Rust is a type that represents data that is one of
+several possible variants. Each variant in the `enum` can optionally
+have data associated with it:
 
 ```rust
 enum Message {
@@ -12,9 +13,8 @@ enum Message {
 }
 ```
 
-Each variant can optionally have data associated with it. The syntax for
-defining variants resembles the syntaxes used to define structs: you can
-have variants with no data (like unit-like structs), variants with named
+The syntax for defining variants resembles the syntaxes used to define structs:
+you can have variants with no data (like unit-like structs), variants with named
 data, and variants with unnamed data (like tuple structs). Unlike
 separate struct definitions, however, an `enum` is a single type. A
 value of the enum can match any of the variants. For this reason, an
@@ -41,7 +41,7 @@ let y: BoardGameTurn = BoardGameTurn::Move { squares: 1 };
 Both variants are named `Move`, but since they’re scoped to the name of
 the enum, they can both be used without conflict.
 
-A value of an enum type contains information about which variant it is,
+A value of an `enum` type contains information about which variant it is,
 in addition to any data associated with that variant. This is sometimes
 referred to as a ‘tagged union’, since the data includes a ‘tag’
 indicating what type it is. The compiler uses this information to
@@ -67,7 +67,7 @@ equality yet, but we’ll find out in the [`traits`][traits] section.
 
 # Constructors as functions
 
-An enum’s constructors can also be used like functions. For example:
+An `enum` constructor can also be used like a function. For example:
 
 ```rust
 # enum Message {
@@ -76,7 +76,7 @@ An enum’s constructors can also be used like functions. For example:
 let m = Message::Write("Hello, world".to_string());
 ```
 
-Is the same as
+is the same as
 
 ```rust
 # enum Message {