From 1f7c18300a2f51c54f24f31aea6d38226ddcd4ba Mon Sep 17 00:00:00 2001 From: Yiffy Dev Date: Sun, 3 Nov 2024 17:12:01 +0500 Subject: [PATCH] tests: ufix: usey macro didn`t recognize qualified path --- sabry_procmacro_impl/src/impls/usey.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sabry_procmacro_impl/src/impls/usey.rs b/sabry_procmacro_impl/src/impls/usey.rs index caf31ef..56b2ba5 100644 --- a/sabry_procmacro_impl/src/impls/usey.rs +++ b/sabry_procmacro_impl/src/impls/usey.rs @@ -36,9 +36,10 @@ impl StyleCall { let call_syntax = quote! {#call_path #call_bang (syntax)}; let module_name = call_path - .get_ident() - .expect("BUG: failed to get identifier for macro call") - .to_string(); + .segments + .last() + .map(|l| l.ident.to_string()) + .expect("BUG: failed to get identifier for macro call"); if self.vis_pub { quote! {