Skip to content

Consider exposing word from UnknownWordError #4

@Kixunil

Description

@Kixunil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions