January 2019
Beginner to intermediate
554 pages
13h 31m
English
To a programmer coming to Rust, often the confusion is around which one to use. Well, the best practice is to use APIs that take a &str type when possible, as when the string is already allocated somewhere, you can save copying and allocation costs just by referencing that string. Passing &str around your program is nearly free: it incurs nearly no allocation costs and no copying of memory.
Read now
Unlock full access