monica_b1998@lemmy.world to Rust@programming.dev · 9 days agoError Handling in Rust vs. Exceptions in other languagesslicker.meexternal-linkmessage-square22fedilinkarrow-up134arrow-down11
arrow-up133arrow-down1external-linkError Handling in Rust vs. Exceptions in other languagesslicker.memonica_b1998@lemmy.world to Rust@programming.dev · 9 days agomessage-square22fedilink
minus-squareKindaABigDyl@programming.devlinkfedilinkarrow-up10·8 days agoI think this is more idiomatic: let result = foo(a, b) .map_err(|e| MyErrorEnum::Error(e.to_string()));
I think this is more idiomatic:
let result = foo(a, b) .map_err(|e| MyErrorEnum::Error(e.to_string()));