logoalt Hacker News

GreenDolphinSys • yesterday at 9:59 PM • 1 reply • view on HN

They're saying that you don't always have to return Result<T, Box<dyn Error>>, you can implement the From<Error> trait on the type and use ? as usual.

In other words implementing that trait lets you set a return type like Result<T, CustomAppError> use ? on it.


Replies

LoganDark • yesterday at 10:00 PM

I think they're saying the author's point is that it's more fiddly in Rust (even if there are strong, well-regarded fiddles to use)

➕ show 2 replies