concise syntax

This commit is contained in:
Max Bradbury 2020-10-15 23:29:48 +01:00
parent 45e113717e
commit 11c9430ccf
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ pub struct Variable {
impl From<String> 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()