Closed sonntag closed 3 years ago
@slipset any chance we can get this merged in?
Sorry, I dropped the ball on this. I would really appreciate it if @KingMob would have a look and approve.
This looks good to me.
I'm trying to think of a counter-scenario where this breaks something, and while it's possible, getting a deferred out of a deferred isn't usually what we want, and pervasive use of unwrap
amounts to the same thing.
One request: @sonntag can you update the docstring to make it clear that the return value of f
will be unwrapped?
@sonntag? I can merge once the docstring is updated. I think it would be nice to get this in before cutting a 0.2.0 release.
@KingMob Just updated the docstring for 2 affected functions. I'm not the best at writing docstrings so up for feedback.
I think "unwrapped value" is more clear than "deferred value", but I'll go ahead and change that myself.
In the current implementation of
time/in
, if the passed function returns a deferred value then after everything is done it results in a deferred wrapping a deferred. This changes it so the deferred returned by the passed function is connected through.