From 8848cd0732a7656a2e0913e63d224618082f21df Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 17 Jun 2026 19:41:11 +0200 Subject: feat(engine-macros): improve flexibility of Reflection macro on generic types --- engine-macros/src/util.rs | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'engine-macros/src/util.rs') diff --git a/engine-macros/src/util.rs b/engine-macros/src/util.rs index 327c517..515b066 100644 --- a/engine-macros/src/util.rs +++ b/engine-macros/src/util.rs @@ -7,8 +7,8 @@ macro_rules! syn_path { ::syn::Path { leading_colon: None, segments: ::syn::punctuated::Punctuated::from_iter([ - $crate::util::syn_path_segment!($first_segment), - $($crate::util::syn_path_segment!($segment),)* + syn_path_segment!($first_segment), + $(syn_path_segment!($segment),)* ]) } }; @@ -26,9 +26,6 @@ macro_rules! syn_path_segment { }; } -pub(crate) use syn_path; -pub(crate) use syn_path_segment; - pub fn find_engine_crate_path() -> Option { let cargo_crate_name = std::env::var("CARGO_CRATE_NAME").ok()?; @@ -66,20 +63,3 @@ pub fn syn_path_to_string(path: &syn::Path) -> String output } - -pub trait SynPathExt -{ - fn join(&self, tail: Self) -> Self; -} - -impl SynPathExt for syn::Path -{ - fn join(&self, tail: Self) -> Self - { - let mut new = self.clone(); - - new.segments.extend(tail.segments); - - new - } -} -- cgit v1.2.3-18-g5258