Re:Programming in Rust: the good, the bad, the ugly
by unrealhoang on Tuesday March 12, 2019 @11:01PM
(#19375310)
That source &str can be de-allocated before the String, and you need to track that through some kind of Rc. String is not just about mutability but also about ownership, if my function got a String, I know for sure after its execution, the memory will be released (if I don’t transfer the ownership back). I like this way much more. If in any case I need Cow, well, Rust has that in the standard library.
[ Parent
| on HN ]
There are no comments on this comment yet.