Skip to content

Cache trait fetch method error type only impls Debug, but it would make a _lot_ more sense to impl either Display or Error. #149

@Zistack

Description

@Zistack

And this does cause some weird issues. I'm using the FileCache implementation provided with the crate, which returns an std::io::Error in practice when something goes wrong. The info in that error type could be useful to the user, but because of the way the trait is defined, I can't use the Display implementation of that type. Printing it with Debug looks pretty goofy and is comparatively hard to read if I am actually interested in the error message.

I think that errors meant to be printed to the console should generally be assumed to implement Display at least, but also the Error trait was made specifically for this kind of situation.

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