book icon indicating copy to clipboard operation
book copied to clipboard

Listing 20-20 Commentary improvement

Open Yung-Beef opened this issue 1 year ago • 0 comments
trafficstars

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch20-02-multithreaded.html

Description of the problem: This code block contains job() which seems to have appeared out of nowhere, and the text doesn't explain it. We never defined a job function, and it has a semicolon after it so the variable isn't being returned (and variables don't have parentheses after them anyways).

Suggested fix: Explain why job() is there, what type it is, what it's doing, why it has parentheses and is followed by a semicolon.

Yung-Beef avatar Aug 15 '24 13:08 Yung-Beef