Skip to content

Commit

Permalink
Remove unused function from bevy_macro_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Feb 8, 2022
1 parent 1b02e08 commit ced8124
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions crates/bevy_macro_utils/src/attrs.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
use syn::DeriveInput;

use crate::Symbol;

pub fn get_attr_meta_items(
attr: &syn::Attribute,
attr_name: &'static str,
) -> syn::Result<Vec<syn::NestedMeta>> {
if !attr.path.is_ident(attr_name) {
return Ok(Vec::new());
}

match attr.parse_meta()? {
syn::Meta::List(meta) => Ok(meta.nested.into_iter().collect()),
other => Err(syn::Error::new_spanned(
other,
format!("expected #[{}(...)]", attr_name),
)),
}
}
use crate::symbol::Symbol;

pub fn parse_attrs(ast: &DeriveInput, attr_name: Symbol) -> syn::Result<Vec<syn::NestedMeta>> {
let mut list = Vec::new();
Expand Down

0 comments on commit ced8124

Please sign in to comment.