aboutsummaryrefslogtreecommitdiff
path: root/src/splitter.rs
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-07-09 14:47:19 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-07-09 14:47:19 +0200
commitafa9d5b588a9f8dcd0e38f0ffd28977d2ae9b60a (patch)
tree92d169d2f27ae642c79dbfc3150eb834c270490c /src/splitter.rs
parent019d08f3441c9e499977d583bb0f8383aff50d4b (diff)
set max parsing theads to 4
Diffstat (limited to 'src/splitter.rs')
-rw-r--r--src/splitter.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/splitter.rs b/src/splitter.rs
index c4015e8..d3a0bdb 100644
--- a/src/splitter.rs
+++ b/src/splitter.rs
@@ -6,13 +6,14 @@ pub fn split_to_words(data : String) -> Vec<String> {
let mut v : Vec<String> = data
.to_lowercase()
.split_whitespace()
- .map(str::to_string).collect();
+ .map(String::from)
+ .collect();
for word in v.iter_mut() {
word.retain(|c| !r#"{}[]#(),".;:?!'%|0123456789/\^"#.contains(c))
}
- v.retain(|str| !str.is_empty() && !str.contains("--"));
+ v.retain(|str| !str.is_empty());
v
}