You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/doc/trpl/dining-philosophers.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -432,7 +432,9 @@ an extra annotation, `move`, to indicate that the closure is going to take
432
432
ownership of the values it’s capturing. Primarily, the `p` variable of the
433
433
`map` function.
434
434
435
-
Inside the thread, all we do is call `eat()` on `p`.
435
+
Inside the thread, all we do is call `eat()` on `p`. Also note that the call to `thread::spawn` lacks a trailing semicolon, making this an expression. This distinction is important, yielding the correct return value. For more details, read [Expressions vs. Statements][es].
0 commit comments