mirror of https://github.com/zkat/miette.git
fix(derive): allow unused variables for the snippets method
This commit is contained in:
parent
ee2e2d1ef2
commit
f704d6a9ae
|
|
@ -261,6 +261,7 @@ impl Snippets {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
|
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
|
||||||
Some(Box::new(vec![
|
Some(Box::new(vec![
|
||||||
#(#snippets),*
|
#(#snippets),*
|
||||||
|
|
@ -398,6 +399,7 @@ impl Snippets {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
|
#[allow(unused_variables)]
|
||||||
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
|
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
|
||||||
match self {
|
match self {
|
||||||
#(#variant_arms)*
|
#(#variant_arms)*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue