-
-
Replying to @jaleks_
That conversion gives you a String. Literals are &'static str. Both are string types, of course, but they're very different in other ways
2 replies 2 retweets 2 likes -
That's why I prefer .to_owned() it's also faster.
1 reply 0 retweets 0 likes -
is it still faster? Wasn't .to_string() specialized?
1 reply 0 retweets 0 likes -
AFAIK specialization is allowed only in nightly. Maybe it's already used in std - I don't know.
2 replies 0 retweets 0 likes
It is already used in std and they should generate identical code
4:19 PM - 8 Jul 2017
0 replies
0 retweets
2 likes
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.