cogciprocate / ocl

OpenCL for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoid direct `Fail` trait implementation

drahnr opened this issue · comments

First of all, thank you for this exceptional crate!

I have a usability nitpick though. The error type does not implement the error trait, and hence makes it harder to use than necessary when combined with anyhow or friends, which rely on the fact that trait Error is implemented for automatic conversion.

Now with the trait Fail impl one runs into rustc errors which suggest to add .map_err(|e| e.into())? when using anyhow since the auto conversion fails.

Moving away from failure to i.e. thiserror would simplify error handling or just implementing trait Error from std would also suffice.

I'd be happy to hear your thoughts and if necessary create a PR