MCPcopy Create free account
hub / github.com/csskit/csskit / has_attribute

Function has_attribute

crates/derive_atom_set/src/atom_set.rs:19–21  ·  view source on GitHub ↗
(attrs: &[Attribute], name: &str)

Source from the content-addressed store, hash-verified

17}
18
19fn has_attribute(attrs: &[Attribute], name: &str) -> bool {
20 attrs.iter().any(|attr| attr.path().is_ident(name))
21}
22
23// For single character idents a lookup table is the most efficient;
24// we only need to store a 256 item table, and direct lookup will be

Callers 1

generateFunction · 0.85

Calls 2

iterMethod · 0.80
pathMethod · 0.80

Tested by

no test coverage detected