ncsurobotics / SW8S-Rust

Rust code for Seawolf 8
GNU General Public License v3.0
3 stars 3 forks source link

Add Macro for Action Chaining #99

Closed Bennett-Petzold closed 8 months ago

Bennett-Petzold commented 8 months ago

Adds the act_nest! macro, which allows the tuple macros to be chained for >2 actions without heavily repeated boilerplate.

Example usage:

act_nest!(
    RaceAction::new,
    AlwaysTrue::new(),
    AlwaysTrue::new(),
    AlwaysTrue::new(),
    AlwaysTrue::new(),
    AlwaysTrue::new()
)