MCPcopy Create free account
hub / github.com/Wulf/tsync / has_attribute

Function has_attribute

src/utils.rs:17–24  ·  view source on GitHub ↗
(needle: &str, attributes: &[syn::Attribute])

Source from the content-addressed store, hash-verified

15];
16
17pub fn has_attribute(needle: &str, attributes: &[syn::Attribute]) -> bool {
18 attributes.iter().any(|attr| {
19 attr.path()
20 .segments
21 .iter()
22 .any(|segment| segment.ident == needle)
23 })
24}
25
26/// Ensures that a parsed expression is a valid Rust module-like path and the
27/// path contains valid segments.

Callers 1

has_tsync_attributeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected