|
|
|
|
|
by steveklabnik
3003 days ago
|
|
FWIW, this is why we go over this stuff in the book now; lots of people struggle with it, it's not just you. And yeah, Deref doesn't kick in everywhere, so you may need the .as_str() in those situations. It should be the extreme minority case, generally. Same with .to_string(), though moreso. Most stuff should take &str, not String. |
|