Anders429 / word_filter

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

Static construction #39

Closed Anders429 closed 3 years ago

Anders429 commented 3 years ago

Huge change to make construction of WordFilters a compile-time process, resulting in static structures.

Fixes #37.

This bumps back the MSRV to 1.51.0 due to the use of const generics. It can't be done without const generics, because the Nodes need to be stored at a fixed location in order for the self-referencing to work.

This PR also bumps the crate version to 0.5.0 and introduces a word_filter_codegen crate. The codegen crate is also at 0.5.0 to match the root crate. These versions should always be kept in sync so that users will always know the versions are correct if they are matching.

Anders429 commented 3 years ago

The drop in code coverage is expected. I did everything I could to get the coverage as high as I could, but it's just a losing battle at this point. Maybe someday tarpaulin will have better coverage. For now, I know this is as covered as I can possibly get it.