Closed haf closed 3 years ago
This would be nice. If this is done then also should be done for Expect.isSome
.
Perhaps the function could be called something else though so that it's backwards compatible -- maybe getOk
? Or could be put in another namespace+module that could be opened (like Flip)?
This issue has been fixed by #376.
When using
Expecto.Flip.Expect
(or plainExpecto.Expect
), it would be great if most assertions would yield the "inner" or "extracted" value if possible.This would be a breaking change, but it would be a very nice change and you'd get compiler warnings for all things that now return values. A naming convention for things not returning the values should be set up, too.
This issues is 1) discussion, 2) implementation, but it's a very easy contribution, so this is a nice issue to get started on.