Skip to content
Snippets Groups Projects
Verified Commit 071b535a authored by Louis's avatar Louis :fire:
Browse files

Bump version

parent 0ce86f7e
No related branches found
No related tags found
No related merge requests found
[package]
name = "micro_games_macros"
version = "0.3.1"
version = "0.4.0"
edition = "2021"
authors = ["Louis Capitanchik <contact@louiscap.co>"]
description = "Utility macros to make it easier to build complex systems with Bevy"
......
......@@ -55,24 +55,17 @@ fn define_structs(data: &DataEnum) -> TokenStream {
let event_name = ident_suffix(ident, "Event");
let fields: TokenStream = fields
.iter()
.map(
|fl @ Field {
ident,
ty,
mutability,
..
}| {
let f = Field {
ident: ident.clone(),
ty: ty.clone(),
vis: parse_quote!(pub),
..fl.clone()
}
.to_token_stream();
quote!(#f,)
},
)
.map(|fl @ Field { ident, ty, .. }| {
let f = Field {
ident: ident.clone(),
ty: ty.clone(),
vis: parse_quote!(pub),
..fl.clone()
}
.to_token_stream();
quote!(#f,)
})
.collect();
quote! {
......
use micro_games_macros::event_system;
use std::sync::Mutex;
#[test]
fn event_system_correctly_generates_and_dispatches_events() {
......@@ -22,7 +22,7 @@ fn event_system_correctly_generates_and_dispatches_events() {
app.add_plugins(MyEventsPlugin);
app.add_systems(
Update,
|mut has_run: ResMut<HasRun>, mut events: EventReader<WaitEvent>| {
|mut has_run: ResMut<HasRun>, events: EventReader<WaitEvent>| {
has_run.0 = true;
let event_length = events.len();
assert_eq!(event_length, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment