From afa9d5b588a9f8dcd0e38f0ffd28977d2ae9b60a Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 9 Jul 2023 14:47:19 +0200 Subject: set max parsing theads to 4 --- src/splitter.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/splitter.rs') 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 { let mut v : Vec = 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 } -- cgit v1.2.3-70-g09d2