Skip to content

Commit 683152e

Browse files
committed
Fix up the doc tests to use the new tick FnMut ordering.
1 parent 4fd3c8d commit 683152e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bonsai/src/behavior.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ pub enum Behavior<A> {
8787
///let mut bt = BT::new(rs, ());
8888
///
8989
///let mut i = 0;
90-
///let status = bt.tick(&Event::zero_dt_args(), &mut |args: ActionArgs<Event, Ex>, _| {
91-
/// match args.action {
90+
///let status = bt.tick(&Event::zero_dt_args(), &mut |action, _, _| {
91+
/// match action {
9292
/// Ex::A => {
9393
/// i += 1;
9494
/// if i == 4 {

bonsai/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
//! fn tick(mut acc: i32, dt: f64, bt: &mut BT<Actions, HashMap<String, i32>>) -> i32 {
5252
//! let e: Event = UpdateArgs { dt }.into();
5353
//!
54-
//! let (_status, _dt) = bt.tick(&e, &mut |args, blackboard| match *args.action {
54+
//! let (_status, _dt) = bt.tick(&e, &mut |action, blackboard, args| match *action {
5555
//! Actions::Inc => {
5656
//! acc += 1;
5757
//! (Success, args.dt)

0 commit comments

Comments
 (0)