Open tormol opened 5 months ago
Thanks for submitting this. If I remember correctly, those functions in the Error
trait were experimental at the time when Speedy2D was released.
In principle this looks fine, it just needs formatting with cargo +nightly fmt
.
I didn't notice
cause()
wasn't coming from the Error trait, until I passed the error to a&dyn Error
-taking function and was surprised thatcause()
was suddenly returningNone
.Is there a reason why it's implemented as an inherent method instead of as part of the Error trait? I don't think a reference to a boxed trait object lets the caller do anything more than they could with a reference to a trait object.
I've ran most of the pre-commit commands, but the
--tests
part ofcargo test
andcargo test --no-default-features
fails with:(On linux with wayland)