diff --git a/src/pattern-matching/destructuring-structs.md b/src/pattern-matching/destructuring-structs.md index f0071686..c5bba091 100644 --- a/src/pattern-matching/destructuring-structs.md +++ b/src/pattern-matching/destructuring-structs.md @@ -4,7 +4,7 @@ minutes: 4 # Structs -Like tuples, Struct can also be destructured by matching: +Like tuples, structs can also be destructured by matching: ```rust,editable {{#include ../../third_party/rust-by-example/destructuring-structs.rs}} diff --git a/src/pattern-matching/exercise.md b/src/pattern-matching/exercise.md index bbe30347..c084fba9 100644 --- a/src/pattern-matching/exercise.md +++ b/src/pattern-matching/exercise.md @@ -22,7 +22,7 @@ to `30`. We can represent the expression as a tree: ``` A bigger and more complex expression would be `(10 * 9) + ((3 - 4) * 5)`, which -evaluate to `85`. We represent this as a much bigger tree: +evaluates to `85`. We represent this as a much bigger tree: diff --git a/src/pattern-matching/infallible.md b/src/pattern-matching/infallible.md index 0624cea4..04d0d9d0 100644 --- a/src/pattern-matching/infallible.md +++ b/src/pattern-matching/infallible.md @@ -37,8 +37,8 @@ fn main() { - Patterns are type-specific, including irrefutable patterns. Try adding or removing an element to the tuple and look at the resulting compiler errors. -- Variable names are patterns that always match and which bind the matched value - into a new variable with that name. +- Variable names are patterns that always match and bind the matched value into + a new variable with that name. - `_` is a pattern that always matches any value, discarding the matched value. diff --git a/src/pattern-matching/let-control-flow.md b/src/pattern-matching/let-control-flow.md index dcf05060..1ea58acb 100644 --- a/src/pattern-matching/let-control-flow.md +++ b/src/pattern-matching/let-control-flow.md @@ -4,7 +4,7 @@ minutes: 10 # Let Control Flow -Rust has a few control flow constructs which differ from other languages. They +Rust has a few control flow constructs that differ from other languages. They are used for pattern matching: - `if let` expressions diff --git a/src/pattern-matching/let-control-flow/while-let.md b/src/pattern-matching/let-control-flow/while-let.md index ca58bb6e..92b047ef 100644 --- a/src/pattern-matching/let-control-flow/while-let.md +++ b/src/pattern-matching/let-control-flow/while-let.md @@ -2,7 +2,7 @@ Like with `if let`, there is a [`while let`](https://doc.rust-lang.org/reference/expressions/loop-expr.html#predicate-pattern-loops) -variant which repeatedly tests a value against a pattern: +variant that repeatedly tests a value against a pattern: ```rust,editable fn main() { diff --git a/src/pattern-matching/match.md b/src/pattern-matching/match.md index 01f24824..f4f986ea 100644 --- a/src/pattern-matching/match.md +++ b/src/pattern-matching/match.md @@ -35,7 +35,7 @@ Key Points: - You might point out how some specific characters are being used when in a pattern - `|` as an `or` - - `..` can expand as much as it needs to be + - `..` matches any number of items - `1..=5` represents an inclusive range - `_` is a wild card