Skip to content

Commit 263bdf4

Browse files
bjorn3exjam
authored andcommitted
Misc dependency improvements (bevyengine#4545)
A couple more uncontroversial changes extracted from bevyengine#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
1 parent 27f9744 commit 263bdf4

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

crates/bevy_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ proc-macro = true
1515
bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.8.0-dev" }
1616

1717
quote = "1.0"
18-
syn = "1.0"
18+
syn = { version = "1.0", features = ["full"] }

crates/bevy_macro_utils/src/attrs.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
use syn::DeriveInput;
22

3-
use crate::Symbol;
4-
5-
pub fn get_attr_meta_items(
6-
attr: &syn::Attribute,
7-
attr_name: &'static str,
8-
) -> syn::Result<Vec<syn::NestedMeta>> {
9-
if !attr.path.is_ident(attr_name) {
10-
return Ok(Vec::new());
11-
}
12-
13-
match attr.parse_meta()? {
14-
syn::Meta::List(meta) => Ok(meta.nested.into_iter().collect()),
15-
other => Err(syn::Error::new_spanned(
16-
other,
17-
format!("expected #[{}(...)]", attr_name),
18-
)),
19-
}
20-
}
3+
use crate::symbol::Symbol;
214

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

crates/bevy_reflect/bevy_reflect_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ proc-macro = true
1414
[dependencies]
1515
bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.8.0-dev" }
1616

17-
syn = "1.0"
17+
syn = { version = "1.0", features = ["full"] }
1818
proc-macro2 = "1.0"
1919
quote = "1.0"
2020
uuid = { version = "0.8", features = ["v4", "serde"] }

0 commit comments

Comments
 (0)