]> git.lizzy.rs Git - rust.git/commit
collections: Avoid unstable code in examples for String
authorUlrik Sverdrup <root@localhost>
Tue, 19 May 2015 01:33:17 +0000 (03:33 +0200)
committerUlrik Sverdrup <root@localhost>
Tue, 19 May 2015 01:33:17 +0000 (03:33 +0200)
commit4e4374b7de0beec459f6d9db8e06f2cad0c969e7
treeb0f1e553dc26cdd66b1af1ef233c5dd2fc571abc
parent4daa62a55f906bd7ec7ad265cb23d49d9d0db66a
collections: Avoid unstable code in examples for String

Prefer String::from over from_str; String::from_str is unstable while
String::from is stable. Promote the latter by using it in examples.

Simply migrating unstable function to the closest alternative.
src/liballoc/rc.rs
src/libcollections/string.rs