Skip to content

Wrapped Error type in Box#25

Merged
brycx merged 2 commits intobrycx:masterfrom
mdtro:fixing-error-result
Aug 8, 2020
Merged

Wrapped Error type in Box#25
brycx merged 2 commits intobrycx:masterfrom
mdtro:fixing-error-result

Conversation

@mdtro
Copy link
Copy Markdown
Contributor

@mdtro mdtro commented May 10, 2020

This PR makes a simple change the function signatures I implemented a few weeks ago. Instead of passing io::Error in the Result type -- I should be wrapping the Error trait in a Box to better handle all possibilities.

Copy link
Copy Markdown
Owner

@brycx brycx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a worthwhile change, I hadn't thought about this before.

Perhaps load_config should also return this instead, since it's used directly in main.rs? Also, we probably want to propagate all the current unwrap()s with ? in the functions returning a Result. Though this could also be implemented in a different PR.

clippy has some complaints that would be nice to have fixed before merging this.

@mdtro
Copy link
Copy Markdown
Contributor Author

mdtro commented Jul 22, 2020

Made the requested updates. Let me know your thoughts. :)

@mdtro mdtro requested a review from brycx July 22, 2020 03:04
@brycx
Copy link
Copy Markdown
Owner

brycx commented Aug 8, 2020

CI fails some tests, which it has done before. All tests are green locally however. LGTM.

@brycx brycx merged commit d97bec9 into brycx:master Aug 8, 2020
@brycx
Copy link
Copy Markdown
Owner

brycx commented Aug 8, 2020

Thanks @mdtro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants