Skip to content

Commit

Permalink
unit type value is also a value
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytonyjan committed Aug 21, 2019
1 parent 7ddc464 commit 52ffe26
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 an 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 52ffe26

Please sign in to comment.