From e6443565ebc7c71d549226debb7e1d9a3e3812a8 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Tue, 2 Aug 2016 17:56:34 -0400 Subject: [PATCH] Use a string literal instead of `String::from`; that's not a method We've talked about Strings vs string literals at this point. Hopefully this should be less distracting. --- src/ch05-01-method-syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch05-01-method-syntax.md b/src/ch05-01-method-syntax.md index 854d1eb..74ec4f9 100644 --- a/src/ch05-01-method-syntax.md +++ b/src/ch05-01-method-syntax.md @@ -4,9 +4,9 @@ In the last section on ownership, we made several references to ‘methods’. Methods look like this: ```rust -let s1 = String::from("hello"); +let s1 = "hello"; -// call a method on our String +// call a method on s1 let s2 = s1.clone(); println!("{}", s1);