Fix doc test.

This commit is contained in:
Stephen Chung 2021-08-27 12:10:58 +08:00
parent aec4417bd5
commit 6f3de4c803

View File

@ -208,6 +208,7 @@ impl Engine {
/// // Use `register_fn` to register methods on the type.
/// .register_fn("update", TestStruct::update);
///
/// # #[cfg(not(feature = "no_object"))]
/// assert_eq!(
/// engine.eval::<TestStruct>("let x = new_ts(); x.update(41); x")?,
/// TestStruct { field: 42 }