Skip to content

Commit

Permalink
Use associated function syntax for calling get on an EnumIter, el…
Browse files Browse the repository at this point in the history
…iminating ambiguities. (#357)
  • Loading branch information
bluurryy authored Jun 1, 2024
1 parent 9689d7b commit 0c85c16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strum_macros/src/macros/enum_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
::core::option::Option::None
} else {
self.idx = idx;
self.get(idx - 1)
#iter_name::get(self, idx - 1)
}
}
}
Expand All @@ -154,7 +154,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
::core::option::Option::None
} else {
self.back_idx = back_idx;
self.get(#variant_count - self.back_idx)
#iter_name::get(self, #variant_count - self.back_idx)
}
}
}
Expand Down

0 comments on commit 0c85c16

Please sign in to comment.