Ephera to Rust Programming@lemmy.mlEnglish • 20 days agoWhen I have an Option<Result<T, E>> but need a Result<Option<T>, E>lemmy.mlimagemessage-square7fedilinkarrow-up151arrow-down16
arrow-up145arrow-down1imageWhen I have an Option<Result<T, E>> but need a Result<Option<T>, E>lemmy.mlEphera to Rust Programming@lemmy.mlEnglish • 20 days agomessage-square7fedilink
minus-square@SWW13@lemmy.brief.gurulinkfedilink11•19 days agoYou can use transpose() to go from Option<Result<T>> to Result<Option<T>> and vice versa. The “meme” is a trans pride flag and a human pose.
You can use
transpose()
to go fromOption<Result<T>>
toResult<Option<T>>
and vice versa.The “meme” is a trans pride flag and a human pose.
Ah, so a trans pose.
Nice.