Isn't there still a holy war over that vs str.to_owned()?
-
-
Replying to @sgrif @withoutboats
I use str.to_owned() and I can confirm it's superiority.
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. lol1 reply 0 retweets 0 likes -
Replying to @Sunjay03 @withoutboats
I'm firmly in the `String::from` camp. I know that `String` is heap allocated, and I know that I'm getting `String` as a result. `.to_owned` tells me neither of those things.
1 reply 0 retweets 4 likes -
This Tweet is unavailable.
-
Replying to @withoutboats @Sunjay03
That hack comes with implicit conversion that makes this argument pointless though doesn't it?
1 reply 0 retweets 1 like -
This Tweet is unavailable.
-
Can I put on my idiot hat and suggest "string literals" become (pointer, len, len) instead of just (pointer, len) Still immutable String, can't be reallocated to attempt dropping rodata memory
1 reply 0 retweets 0 likes -
This Tweet is unavailable.
-
&'static String *COSMIC BRAIN*
2 replies 0 retweets 3 likes -
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.
-
This Tweet is unavailable.
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.