▲ 30 ▼ Error Handling in Rust vs. Exceptions in other languages (slicker.me) submitted 4 months ago by monica_b1998@lemmy.world to c/rust@programming.dev 18 comments fedilink hide all child comments
[–] KindaABigDyl@programming.dev 9 points 4 months ago I think this is more idiomatic: let result = foo(a, b) .map_err(|e| MyErrorEnum::Error(e.to_string())); permalink fedilink source parent