From 132962f5c3c4909e58176a9fec0f32fa9cfa0056 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Thu, 3 Jun 2021 13:46:21 +0300 Subject: [PATCH] `"".to_string()` isn't idiomatic in Rust; use `String::new()` or `String::default()` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3888de8..5ca6bd0 100644 --- a/README.md +++ b/README.md @@ -1035,7 +1035,7 @@ Then add some methods. First a new method. Note: `new` isn't a keyword in Rust - ```rust fn new() -> Self { // Can also write City Self { - name: "".to_string(), + name: String::new(), population: 0 } }