3 ms·
Gotcha! FWIW, serde_json makes it very easy; if you were doing it yourself, I can see how it'd be harder :) The second edition of the book's ownership and bor
by steveklabnik 9y ago
Gotcha!
FWIW, serde_json makes it very easy; if you were doing it yourself, I can see how it'd be harder :)
The second edition of the book's ownership and borrowing chapters go into String vs &str in great detail, if you want to become super sharp :)
(and yeah, we agree that the lifetime annotation isn't very nice looking, but every alternative we tried looked worse.)
- robotmay 9y agoAwesome, thanks for the tips Steve :D Hopefully we'll have a few other projects coming up that I can use as an excuse to do more Rust!