From dbad16021cec2a842f5c8d6b9a28ba2039044cb8 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Sun, 4 Oct 2015 11:42:09 -0400 Subject: [PATCH] Add some more common String/&str idioms --- strings/strings3.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/strings/strings3.rs b/strings/strings3.rs index dbba39d..a4e5775 100644 --- a/strings/strings3.rs +++ b/strings/strings3.rs @@ -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());