fix(derive): absolute path references to Diagnostic (#118)

This commit is contained in:
Paul Colomiets 2022-02-20 03:01:18 +02:00 committed by GitHub
parent 9d50daf351
commit 6eb3d2d8a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ impl Related {
quote! {
Self::#ident #display_pat => {
std::option::Option::Some(std::boxed::Box::new(
#rel.iter().map(|x| -> &(dyn Diagnostic) { &*x })
#rel.iter().map(|x| -> &(dyn miette::Diagnostic) { &*x })
))
}
}
@ -69,7 +69,7 @@ impl Related {
let rel = &self.0;
Some(quote! {
fn related<'a>(&'a self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = &'a dyn miette::Diagnostic> + 'a>> {
std::option::Option::Some(std::boxed::Box::new(self.#rel.iter().map(|x| -> &(dyn Diagnostic) { &*x })))
std::option::Option::Some(std::boxed::Box::new(self.#rel.iter().map(|x| -> &(dyn miette::Diagnostic) { &*x })))
}
})
}