niceware
niceware copied to clipboard
Consider exposing word from `UnknownWordError`
Inspecting specific word that is unknown may be useful to some callers but adding a method to retrieve it basically commits to always storing it within error type. I think it's very reasonable to expect that it will always be there but opened an issue just in case. The suggested method is:
/// The word that is not known
fn word(&self) -> &str {
&self.word
}
An alternative would be to continue scanning the words even after error and return a slice of all unknown words.