Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support User defined Error Handling #2

Open
drmason13 opened this issue May 8, 2021 · 0 comments
Open

Support User defined Error Handling #2

drmason13 opened this issue May 8, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@drmason13
Copy link
Owner

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!

@drmason13 drmason13 added enhancement New feature or request good first issue Good for newcomers labels May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant