feat: refactor sentence and word analysis to use counts instead of collections

Rewrite `get_sentences` to return a `usize` count instead of `Vec<&str>`, removing the trailing-dot cleanup logic. Replace `get_words` and `get_capitalized_words` with a single `get_words` function that mutates output counters for total words, capitalized words, and forbidden words, iterating directly over the content. Add release profile optimizations with thin LTO and abort-on-panic in Cargo.toml.
This commit is contained in:
2024-12-01 22:23:32 +00:00
parent 6ce4c8b9cd
commit 524ef8343c
2 changed files with 72 additions and 49 deletions
+4
View File
@@ -5,3 +5,7 @@ edition = "2021"
[dependencies]
rayon = "1.10.0"
[profile.release]
lto = "thin"
panic = "abort"