diff options
Diffstat (limited to 'mingling_pathf/src/patterns/renderer.rs')
| -rw-r--r-- | mingling_pathf/src/patterns/renderer.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mingling_pathf/src/patterns/renderer.rs b/mingling_pathf/src/patterns/renderer.rs index 410ae14..c2e9ca9 100644 --- a/mingling_pathf/src/patterns/renderer.rs +++ b/mingling_pathf/src/patterns/renderer.rs @@ -1,3 +1,7 @@ +//! The `RendererPattern` matches functions annotated with `#[renderer]` and +//! extracts the generated internal struct name (e.g., `__internal_renderer_<fn_name>`). +//! This is used to track rendering functions for code generation or analysis. + use syn::Item; use crate::pattern_analyzer::{AnalyzeItem, AnalyzePattern}; @@ -56,10 +60,7 @@ fn collect_from_item(item: &Item, current_mod: &str, items: &mut Vec<AnalyzeItem } fn has_attr(attrs: &[syn::Attribute], name: &str) -> bool { - attrs.iter().any(|a| { - a.path() - .segments - .last() - .is_some_and(|s| s.ident == name) - }) + attrs + .iter() + .any(|a| a.path().segments.last().is_some_and(|s| s.ident == name)) } |
