From 019d08f3441c9e499977d583bb0f8383aff50d4b Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 9 Jul 2023 13:12:00 +0200 Subject: introduce some minor optimizations --- src/splitter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/splitter.rs') diff --git a/src/splitter.rs b/src/splitter.rs index fbb2b6a..c4015e8 100644 --- a/src/splitter.rs +++ b/src/splitter.rs @@ -12,7 +12,7 @@ pub fn split_to_words(data : String) -> Vec { word.retain(|c| !r#"{}[]#(),".;:?!'%|0123456789/\^"#.contains(c)) } - v.retain(|str| !str.is_empty()); + v.retain(|str| !str.is_empty() && !str.contains("--")); v } -- cgit v1.2.3-70-g09d2