From 01a1e5e4f45dc80cd430d18492817b733fab5603 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 26 Feb 2022 22:23:34 +0100 Subject: Fix linter warnings --- src/util/serialization.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/serialization.rs') 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 { - line.split("|") +pub fn line_to_words(line: &str) -> Vec { + line.split('|') .map(|w| w.trim().to_string()) .filter(|w| !w.is_empty()) .collect() } -pub fn words_to_line(words: &Vec) -> String { +pub fn words_to_line(words: &[String]) -> String { words.join(" | ") } -- cgit v1.2.3