Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

doesn't the Rust ecosystem also inconsistently mix Option and Result?

anyway, it's a fairly trivial wrapper to handle the odd annoying thing that raises

Option.try_with (fun () -> thing_that_exns ())

Result.try_with (fun () -> thing_that_exns ())

(it would be nice if you could tell if something raises by the type signature somehow though)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: