Remove unused function from esp-hal-procmacros (#1421)

This commit is contained in:
Jesse Braham 2024-04-11 09:29:29 +00:00 committed by GitHub
parent c73a2d91ae
commit f6925480f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,21 +41,6 @@ pub(crate) fn check_attr_whitelist(
Ok(())
}
pub(crate) fn extract_cfgs(attrs: Vec<Attribute>) -> (Vec<Attribute>, Vec<Attribute>) {
let mut cfgs = vec![];
let mut not_cfgs = vec![];
for attr in attrs {
if eq(&attr, "cfg") {
cfgs.push(attr);
} else {
not_cfgs.push(attr);
}
}
(cfgs, not_cfgs)
}
/// Returns `true` if `attr.path` matches `name`
fn eq(attr: &Attribute, name: &str) -> bool {
attr.style == AttrStyle::Outer && attr.path().is_ident(name)