You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let foo:Foo = Foo::new().tap_lift_err(|foo| foo.do_stuff_that_can_fail())?;
So tap_lift_err would call closure and return Ok(self) if closure result was Ok (ignoring the value) or Err from closure if it returned Err so it can be handled.
tap_lift_err is probably not the best name...
What are your thoughts?
The text was updated successfully, but these errors were encountered:
Not sure if this makes sense for this crate but I happen to need this.
Current code:
Would be nice if I could just write:
So
tap_lift_err
would call closure and returnOk(self)
if closure result wasOk
(ignoring the value) orErr
from closure if it returnedErr
so it can be handled.tap_lift_err
is probably not the best name...What are your thoughts?
The text was updated successfully, but these errors were encountered: