Feature Request: Make miette! macro handle related errors
RobertasJ opened this issue · 3 comments
Problem
Right now, to use related errors in the miette! macro, you have to create a custom struct with a #[related] field. This can be a bit cumbersome and adds extra boilerplate.
Solution
It would be great if the related field in the miette! macro could accept any iterator, like a Vec or any type implementing IntoIterator.
this sounds nice. I'd take a PR for this as long as it's not semver-breaking.
sure, from what i saw it was a pretty easy fix, if the macro works how i expect it to (which means i dont have to change it).
It seems like the reason that these havent been implemented is because this would either require the dyn objects it holds to be clone or it would have to remove its clone derive, this includes over traits like partialeq and eq. as for the related errors part, it needs lifetimes which will also probably break some stuff.