Closed benliepert closed 2 years ago
Also, could you add "Fixes #25" to the PR's description to link the issue here?
There's a clippy error. Could you fix it?
I just found this crate - https://github.com/dtolnay/anyhow. It implements almost the same with_context
function lol, but seems more convenient to use.
Let's not change anything in this PR now, but it would be nice to move to using anyhow
in the future instead of what's being done currently.
Hey @benliepert, just checking in. Will you be able to complete this PR soon? It's completely fine if you do not find the time for it, I can wrap up the PR and merge it :)
Improve error message context if we can't read a given word list. Add a
ToipeError
method,with_context
, that prefixes themsg
with astr
you pass in. Use this method in each of the cases whereRawWordSelector
initialization can fail when initializing Toipe, so that errors from here say "Error reading the given word list: " at the front. (Fixes #25)