From 20cfe717065fa53953e9799036a9972880fec801 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 6 Feb 2022 19:30:53 +0100 Subject: Replace a card whenever the front or the back changed --- src/util/serialization.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/serialization.rs b/src/util/serialization.rs index fcb3062..cc2899f 100644 --- a/src/util/serialization.rs +++ b/src/util/serialization.rs @@ -1,5 +1,8 @@ pub fn line_to_words(line: &String) -> Vec { - line.split("|").map(|w| w.trim().to_string()).filter(|w| !w.is_empty()).collect() + line.split("|") + .map(|w| w.trim().to_string()) + .filter(|w| !w.is_empty()) + .collect() } pub fn words_to_line(words: &Vec) -> String { -- cgit v1.2.3