From 0c85c16e12e80dd49e75117e7c94f697d0ad06d0 Mon Sep 17 00:00:00 2001 From: bluurryy <164359728+bluurryy@users.noreply.github.com> Date: Sun, 2 Jun 2024 00:01:56 +0200 Subject: [PATCH] Use associated function syntax for calling `get` on an `EnumIter`, eliminating ambiguities. (#357) --- strum_macros/src/macros/enum_iter.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strum_macros/src/macros/enum_iter.rs b/strum_macros/src/macros/enum_iter.rs index 5e810019..f8a20700 100644 --- a/strum_macros/src/macros/enum_iter.rs +++ b/strum_macros/src/macros/enum_iter.rs @@ -131,7 +131,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result { ::core::option::Option::None } else { self.idx = idx; - self.get(idx - 1) + #iter_name::get(self, idx - 1) } } } @@ -154,7 +154,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result { ::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) } } }