Anders429 / word_filter

A Word Filter for filtering text.
Apache License 2.0
1 stars 0 forks source link

Switch to Builder pattern for construction of `WordFilter` #8

Closed Anders429 closed 3 years ago

Anders429 commented 3 years ago

Switches from WordFilter::new() to WordFilterBuilder::new().build() (i.e. utilizes the builder pattern). This makes creation of WordFilters more straightforward and easier to read. With the old WordFilter::new() constructor, the user would have to consult the documentation on every use to remember which slice was which and provide empty slices for inputs they didn't need.

codecov-io commented 3 years ago

Codecov Report

Merging #8 (e38d4ce) into master (2b20e64) will decrease coverage by 1.62%. The diff coverage is 85.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
- Coverage   91.64%   90.02%   -1.63%     
==========================================
  Files           4        4              
  Lines         455      481      +26     
==========================================
+ Hits          417      433      +16     
- Misses         38       48      +10     
Impacted Files Coverage Δ
src/lib.rs 86.77% <85.84%> (-2.84%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2b20e64...e38d4ce. Read the comment docs.

Anders429 commented 3 years ago

Not worried about the code coverage. The only reason it's different is because the Options struct was removed.