Skip to content

Commit 45f8699

Browse files
Clarify and fix grammatical errors (#2347)
Fix minor grammatical errors in Day 1: Morning. Speaker notes 6.5: "the `-> ()` return type" changed to "the return type". The compiler will infer the unit type for any type omitted.
1 parent 3fd0792 commit 45f8699

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/control-flow-basics/blocks-and-scopes/scopes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525

2626
- Show that a variable's scope is limited by adding a `b` in the inner block in
2727
the last example, and then trying to access it outside that block.
28-
- Shadowing is different from mutation, because after shadowing both variable's
28+
- Shadowing is different from mutation, because after shadowing both variables'
2929
memory locations exist at the same time. Both are available under the same
3030
name, depending where you use it in the code.
3131
- A shadowing variable can have a different type.

src/control-flow-basics/break-continue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030

3131
<details>
3232

33-
Note that `loop` is the only looping construct which can returns a non-trivial
33+
Note that `loop` is the only looping construct which can return a non-trivial
3434
value. This is because it's guaranteed to only return at a `break` statement
3535
(unlike `while` and `for` loops, which can also return when the condition
3636
fails).

src/control-flow-basics/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn main() {
2929
can be used for early return, but the "bare value" form is idiomatic at the
3030
end of a function (refactor `gcd` to use a `return`).
3131
- Some functions have no return value, and return the 'unit type', `()`. The
32-
compiler will infer this if the `-> ()` return type is omitted.
32+
compiler will infer this if the return type is omitted.
3333
- Overloading is not supported -- each function has a single implementation.
3434
- Always takes a fixed number of parameters. Default arguments are not
3535
supported. Macros can be used to support variadic functions.

0 commit comments

Comments
 (0)