From 11c9430ccf99712183b238381383549bb569aac9 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Thu, 15 Oct 2020 23:29:48 +0100 Subject: [PATCH] concise syntax --- src/variable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variable.rs b/src/variable.rs index eacc48e..c4abd63 100644 --- a/src/variable.rs +++ b/src/variable.rs @@ -7,7 +7,7 @@ pub struct Variable { impl From for Variable { fn from(string: String) -> Variable { let id_value: Vec<&str> = string.lines().collect(); - let id = id_value[0].replace("VAR ", "").to_string(); + let id = id_value[0].replace("VAR ", ""); let initial_value = if id_value.len() == 1 { "".to_string()