diff options
Diffstat (limited to 'src/splitter.rs')
| -rw-r--r-- | src/splitter.rs | 5 |
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 } |