Skip to content

Commit

Permalink
fix(derive): allow unused variables for the snippets method
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 17, 2021
1 parent ee2e2d1 commit f704d6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miette-derive/src/snippets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ impl Snippets {
}
});
Some(quote! {
#[allow(unused_variables)]
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
Some(Box::new(vec![
#(#snippets),*
Expand Down Expand Up @@ -398,6 +399,7 @@ impl Snippets {
})
});
Some(quote! {
#[allow(unused_variables)]
fn snippets(&self) -> std::option::Option<std::boxed::Box<dyn std::iter::Iterator<Item = miette::DiagnosticSnippet>>> {
match self {
#(#variant_arms)*
Expand Down

0 comments on commit f704d6a

Please sign in to comment.