Add some more common String/&str idioms

This commit is contained in:
Carol (Nichols || Goulding) 2015-10-04 11:42:09 -04:00
parent 7af29d6211
commit dbad16021c

View file

@ -10,6 +10,8 @@ fn main() {
("blue");
("red".to_string());
(String::from("hi"));
("rust is fun!".to_owned());
("nice weather".into());
(format!("Interpolation {}", "Station"));
(&String::from("abc")[0..1]);
(" hello there ".trim());