greyblake / whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
https://whatlang.org/
MIT License
966 stars 108 forks source link

Make whitelist/blacklists mutually exclusive #10

Closed Dr-Emann closed 7 years ago

Dr-Emann commented 7 years ago

Detectors can only be created with either a blacklist or a whitelist. This simply enforces this at the type level.

greyblake commented 7 years ago

Thanks! This makes sense for now since options are limited blacklist and whitelist. But maybe we'll need to refactor in the future, if options will need to be extended. I'll merge it for now.

P.S. Sorry for delay, personal stuff.