book
book copied to clipboard
Listing 20-20 Commentary improvement
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.