diff options
Diffstat (limited to 'src/util/serialization.rs')
-rw-r--r-- | src/util/serialization.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/serialization.rs b/src/util/serialization.rs index cc2899f..61b3a83 100644 --- a/src/util/serialization.rs +++ b/src/util/serialization.rs @@ -1,10 +1,10 @@ -pub fn line_to_words(line: &String) -> Vec<String> { - line.split("|") +pub fn line_to_words(line: &str) -> Vec<String> { + line.split('|') .map(|w| w.trim().to_string()) .filter(|w| !w.is_empty()) .collect() } -pub fn words_to_line(words: &Vec<String>) -> String { +pub fn words_to_line(words: &[String]) -> String { words.join(" | ") } |