3 ms·
A tip - you usually don't need lambdas in such cases; this should work: foo().map_err(MyError::FooError)? .bar().map_err(MyError::BarError)?;
by kouteiheika 8y ago
A tip - you usually don't need lambdas in such cases; this should work:
foo().map_err(MyError::FooError)?
.bar().map_err(MyError::BarError)?;
- smaddox 8y agoOh, nice! I did not realize tuple constructors implemented `FnOnce`! Thanks for the tip!