Skip to content

Commit

Permalink
Merge pull request #2061 from tonytonyjan/patch-5
Browse files Browse the repository at this point in the history
unit type value is also a value
  • Loading branch information
steveklabnik committed Oct 22, 2019
2 parents df86c4a + 24b3d87 commit 6f8820d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ch20-02-multithreaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl ThreadPool {
```

We still use the `()` after `FnOnce` because this `FnOnce` represents a closure
that takes no parameters and doesn’t return a value. Just like function
that takes no parameters and returns the unit type `()`. Just like function
definitions, the return type can be omitted from the signature, but even if we
have no parameters, we still need the parentheses.

Expand Down

0 comments on commit 6f8820d

Please sign in to comment.