diff options
| author | HampusM <hampus@hampusmat.com> | 2026-06-17 19:41:11 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-06-17 19:41:11 +0200 |
| commit | 8848cd0732a7656a2e0913e63d224618082f21df (patch) | |
| tree | b4d49de70254840224099279a48c679f0c88012e /engine-macros/src/util.rs | |
| parent | f82a35702cb85da7ace298960024b773a2da6d85 (diff) | |
Diffstat (limited to 'engine-macros/src/util.rs')
| -rw-r--r-- | engine-macros/src/util.rs | 24 |
1 files changed, 2 insertions, 22 deletions
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<syn::Path> { 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 - } -} |
