diff src/ast_dump.rs @ 58:a0b23123901b

Replace "".to_string() and format!("") by String::new().
author Bastien Orivel <eijebong@bananium.fr>
date Sun, 12 Jun 2016 18:52:43 +0200
parents e5a808ec31c0
children 407b3b217928
line wrap: on
line diff
--- a/src/ast_dump.rs
+++ b/src/ast_dump.rs
@@ -227,7 +227,7 @@ impl stmt {
             stmt::AugAssign(target, op, value) => format!("{}{} {}= {}", current_indent, target.to_string(), op.to_string(), value.to_string()),
             stmt::Return(expr) => format!("{}return{}", current_indent, match expr {
                 Some(expr) => format!(" {}", expr.to_string()),
-                None => "".to_string()
+                None => String::new()
             }),
             stmt::ImportFrom(module, names, level) => {
                 format!("{}from {}{} import {}",
@@ -273,7 +273,7 @@ impl stmt {
                     {
                         match msg {
                             Some(msg) => format!(", {}", msg.to_string()),
-                            None => format!("")
+                            None => String::new()
                         }
                     }
                 )