aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorJoris2022-02-06 19:30:53 +0100
committerJoris2022-02-06 19:30:53 +0100
commit20cfe717065fa53953e9799036a9972880fec801 (patch)
tree7fc2a7b4a43eb6d280d52c468927592c12798cb0 /src/util
parentdc0f32017cceabb6c683b6e1b4a2ae0248c37dbf (diff)
Replace a card whenever the front or the back changed
Diffstat (limited to 'src/util')
-rw-r--r--src/util/serialization.rs5
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 {