Skip to content

Commit

Permalink
Remove meta attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeloof committed Jan 7, 2025
1 parent 3d90a8d commit 72e9ba0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 7 additions & 2 deletions examples/macro/barrier/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ enum Event {

#[state_machine(initial = "State::initializing()", state(derive(PartialEq, Eq, Debug)))]
impl Foo {
#[state(superstate = "waiting_for_initialization", default("a", "b", "c"))]
fn initializing(a: &mut bool, b: &mut bool, c: &mut bool, event: &Event) -> Response<State> {
#[state(superstate = "waiting_for_initialization")]
fn initializing(
#[default] a: &mut bool,
#[default] b: &mut bool,
#[default] c: &mut bool,
event: &Event,
) -> Response<State> {
match event {
Event::A => {
*a = true;
Expand Down
7 changes: 0 additions & 7 deletions macro/src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,6 @@ pub fn analyze_state(method: &mut ImplItemMethod, state_machine: &StateMachine)
}
}
}
Meta::List(list) if list.path.is_ident("default") => {
for item in list.nested {
if let NestedMeta::Lit(Lit::Str(value)) = item {
local_storage_default.push(Ident::new(&value.value(), value.span()));
}
}
}
_ => abort!(meta, "unknown attribute"),
}
}
Expand Down

0 comments on commit 72e9ba0

Please sign in to comment.