by msbarnett · 9y ago · 0 comments
String::from("Ferris") creates a pointer to a string on the heap with the contents "Ferris".
The difference is that in C this distinction is implicit, so you can accidentally try to modify the string in static storage, which is undefined behaviour, whereas Rust treats these distinct things as distinct types.