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
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.