Error constructor methods should return Self
instead of Result<(), Self>
#279
Labels
Self
instead of Result<(), Self>
#279
There are places where we want to return an error in a method that returns
Result<Something, Error>
and are forced to do nasty things likeError::crate_config("...").map(|_| unreachable!())
to make it type check. At this point, it would be easier to just doErr(Error::crate_config(".."))
everywhere after changing theError
constructors to returnSelf
.The text was updated successfully, but these errors were encountered: