fix: warnings exposed by increasing MSRV

This commit is contained in:
Charlie Gettys 2025-09-26 09:26:31 -07:00
parent 0e4ed2f9f6
commit ed15abdff4
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ impl Forward {
Self::#variant { #field_name, .. } => #field_name.#method_call, Self::#variant { #field_name, .. } => #field_name.#method_call,
}, },
Forward::Unnamed(index) => { Forward::Unnamed(index) => {
let underscores: Vec<_> = core::iter::repeat(quote! { _, }).take(*index).collect(); let underscores: Vec<_> = std::iter::repeat_n(quote! { _, }, *index).collect();
let unnamed = format_ident!("unnamed"); let unnamed = format_ident!("unnamed");
quote! { quote! {
Self::#variant ( #(#underscores)* #unnamed, .. ) => #unnamed.#method_call, Self::#variant ( #(#underscores)* #unnamed, .. ) => #unnamed.#method_call,

View File

@ -125,7 +125,7 @@ impl HighlighterState for SyntectHighlighterState<'_> {
line, line,
&self.highlighter, &self.highlighter,
) )
.map(|(style, str)| (convert_style(style, use_bg_color).style(str))) .map(|(style, str)| convert_style(style, use_bg_color).style(str))
.collect() .collect()
} else { } else {
vec![Style::default().style(line)] vec![Style::default().style(line)]