get segments from borrowed str instead of String for flexibility

This commit is contained in:
2020-11-06 15:37:00 +00:00
parent 46f8831c7b
commit e992e41635
2 changed files with 3 additions and 5 deletions

View File

@@ -125,7 +125,7 @@ impl Game {
}
let string = string.trim_start_matches('\n').to_string();
let mut segments = segments_from_string(string);
let mut segments = segments_from_str(&string);
let mut name = "".to_string();