Skip to content

Support User defined Error Handling #2

@drmason13

Description

@drmason13

Currently none of the trait methods contain Result in their type signature, so ? won't work in their implementations.

This encourages a lot of unwrap/expect where I would rather discourage it.

I initially avoided using Result in the trait methods because I want to display the output, so I required Display. However Result doesn't implement Display. I think this might be solvable with a more complicated trait bound combining both Result and Display.

Also, that then forces everyone to return a Result in their implementations, that might be a good thing though since this library aims to be used by beginners to Rust.

This would be a breaking change so the sooner the better!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions