monica_b1998@lemmy.world to Rust@programming.dev · 3 days agoError Handling in Rust vs. Exceptions in other languagesslicker.meexternal-linkmessage-square20fedilinkarrow-up134
arrow-up134external-linkError Handling in Rust vs. Exceptions in other languagesslicker.memonica_b1998@lemmy.world to Rust@programming.dev · 3 days agomessage-square20fedilink
minus-squareKindaABigDyl@programming.devlinkfedilinkarrow-up9·2 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()));