korken89 / smlang-rs

A State Machine Language DSL procedual macro for Rust
Apache License 2.0
202 stars 28 forks source link

Can specify initial state when creating Statemachine #20

Closed videni closed 3 years ago

videni commented 3 years ago

For issue unable to initialize statemachine with current state

korken89 commented 3 years ago

Thanks for the addition!

One thing I'd like you to change, make this a new new_with_state or something like that and without the Option, to not break the old API.

korken89 commented 3 years ago

Please rebase on master as well to get the tests to pass.

videni commented 3 years ago

@korken89 , good idea, added.

korken89 commented 3 years ago

Final small comment, could you add a line of documentation on the method?

videni commented 3 years ago

@korken89 , sure

korken89 commented 3 years ago

Thanks for the update! It seems though that the fmt CI does not pass, can you have a look?

videni commented 3 years ago

@korken89 , sorry, it seems correct for me, can you check why please?

korken89 commented 3 years ago

It seems you need to run cargo fmt

videni commented 3 years ago

@korken89, can you merge it please?

korken89 commented 3 years ago

Hi, it seems you still need to run cargo fmt. There are 2 lines with trailing white-space which is causing the CI to fail.

korken89 commented 3 years ago

I'll merge it and fix it from my side.