Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEasy way to turn Error::NotFound into an Option #1273
Comments
This comment has been minimized.
|
You can call |
sgrif
closed this
Oct 27, 2017
This comment has been minimized.
icefoxen
commented
Oct 29, 2017
|
My mistake for not seeing it then, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
icefoxen commentedOct 24, 2017
•
edited
Wishlist item.
In my Rust code I very often find myself doing:
This tends to happen when the absence of a
Thingis perfectly valid, and we should just, say, create a newThingfrom defaults, or do nothing, or even just report a different sort of error (which might be recoverable) than, say, aDatabaseErrororDeserializationError(which probably isn't).Is this common enough for anyone else that it's worth making a shortcut combinator? I'll happily make a PR for it.