Closed
Description
I'm going through the rust book and have gotten to the Dining Philosophers section, at which point I've encountered the following text:
We choose the String type for the name, rather than &str.
None of the previous introduction has even mentioned a str
type, so I had to go looking to find out what it is and how it differs from String. The example seems to assume that the reader would find str
the obvious choice, but the reader hasn't heard of str
at this point.
I'm brand new to rust myself so I'm not sure how this could be introduced better, but I think simply using String and not mentioning str
would be less confusing at this point.
Metadata
Metadata
Assignees
Labels
No labels