Add Dynamic::UNIT.
This commit is contained in:
@@ -118,7 +118,7 @@ engine.register_result_fn("bunny_set_speed", move |speed: i64|
|
||||
return Err("Bunny is not yet going!".into());
|
||||
}
|
||||
|
||||
Ok(().into())
|
||||
Ok(Dynamic::UNIT)
|
||||
);
|
||||
```
|
||||
|
||||
|
@@ -137,7 +137,7 @@ impl Handler {
|
||||
// Default implementation of 'update' event handler
|
||||
self.scope.set_value("state2", SomeType::new(42));
|
||||
// Turn function-not-found into a success
|
||||
Ok(().into())
|
||||
Ok(Dynamic::UNIT)
|
||||
}
|
||||
_ => Err(err.into())
|
||||
})
|
||||
|
@@ -131,7 +131,7 @@ pub mod bunny_api {
|
||||
Err("Bunny is not yet going!".into())
|
||||
} else {
|
||||
b.borrow_mut().set_speed(speed);
|
||||
Ok(().into())
|
||||
Ok(Dynamic::UNIT)
|
||||
}
|
||||
}
|
||||
pub fn turn_left(bunny: &mut SharedBunny) {
|
||||
|
Reference in New Issue
Block a user