diff options
author | Joris | 2022-02-06 19:30:53 +0100 |
---|---|---|
committer | Joris | 2022-02-06 19:30:53 +0100 |
commit | 20cfe717065fa53953e9799036a9972880fec801 (patch) | |
tree | 7fc2a7b4a43eb6d280d52c468927592c12798cb0 /src/util | |
parent | dc0f32017cceabb6c683b6e1b4a2ae0248c37dbf (diff) |
Replace a card whenever the front or the back changed
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/serialization.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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<String> { - 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>) -> String { |