logoalt Hacker News

Graziano_M • yesterday at 9:49 PM • 2 replies • view on HN

I think you're proving the author's point.


Replies

GreenDolphinSys • yesterday at 9:59 PM

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.

➕ show 1 reply
tcfhgj • yesterday at 9:52 PM

how so?

➕ show 1 reply