tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
836 stars 42 forks source link

`<MockBackend as Backend>::Error` should be a real error type #48

Open a1phyr opened 1 year ago

a1phyr commented 1 year ago

Currently, <MockBackend as Backend>::Error is () so it cannot be converted to Box<dyn std::error::Error>.

Using std::convert::Infallible or a standalone type that implement std::error::Error would be more convenient.

tesselode commented 1 year ago

Indeed. I came across this issue when trying to get the doc tests passing when the cpal feature isn't enabled. I ultimately didn't bother fixing it because there were other issues I would have to fix too, and it wasn't worth it. Are you finding this to be an issue outside of running tests?

a1phyr commented 1 year ago

I came across this issue in the exact same situation. I added "cpal" feature in my dev-dependencies and it worked. It may still be worth fixing, though.

tesselode commented 1 year ago

Are you making a library based on Kira?

a1phyr commented 10 months ago

Yes I was making asset_manager-kira, an integration with assets_manager