aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/src/patterns/help.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_pathf/src/patterns/help.rs')
-rw-r--r--mingling_pathf/src/patterns/help.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/mingling_pathf/src/patterns/help.rs b/mingling_pathf/src/patterns/help.rs
index 357626b..628f4ac 100644
--- a/mingling_pathf/src/patterns/help.rs
+++ b/mingling_pathf/src/patterns/help.rs
@@ -1,3 +1,7 @@
+//! The `HelpPattern` matches functions annotated with `#[help]` and
+//! extracts the generated internal struct name (e.g., `__internal_help_<fn_name>`).
+//! This is used to track help 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))
}