Misc dependency improvements (#4545)

A couple more uncontroversial changes extracted from #3886.

* Enable full feature of syn
  
   It is necessary for the ItemFn and ItemTrait type. Currently it is indirectly
   enabled through the tracing dependency of bevy_utils, but this may no
   longer be the case in the future.
* Remove unused function from bevy_macro_utils
This commit is contained in:
bjorn3 2022-04-25 13:16:27 +00:00
parent c64f2a1866
commit ec30822517
3 changed files with 3 additions and 20 deletions

View File

@ -15,4 +15,4 @@ proc-macro = true
bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.8.0-dev" }
quote = "1.0"
syn = "1.0"
syn = { version = "1.0", features = ["full"] }

View File

@ -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();

View File

@ -14,7 +14,7 @@ proc-macro = true
[dependencies]
bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.8.0-dev" }
syn = "1.0"
syn = { version = "1.0", features = ["full"] }
proc-macro2 = "1.0"
quote = "1.0"
uuid = { version = "0.8", features = ["v4", "serde"] }