Thankfully no one writes that today because String::from is objectively superior
-
-
This Tweet is unavailable.
-
Does it? You can't mutate what you can't own. Seems like one of the most fundamental parts of the language to me.
- 1 more reply
-
-
-
There's been code snippets around, to create `&String` pointing to the stack that is basically that, from an arbitrary`&str`. You need a closure though to make it work, or I think now `ManuallyDrop<String>` too would work.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Right after I started using Rust and got used to that method someone made it so that to_string, to_owned, etc. are equivalent so I guess it really doesn't matter. lol