From 85a5aa14b3d6bc4d6faa81aa3cd8d85d862bc9f1 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Tue, 18 May 2021 22:03:34 +0800 Subject: [PATCH] Fix no_index build. --- src/engine_api.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine_api.rs b/src/engine_api.rs index 0b1a0784..ca0ad64b 100644 --- a/src/engine_api.rs +++ b/src/engine_api.rs @@ -570,6 +570,7 @@ impl Engine { /// // Register an indexer. /// .register_indexer_get(TestStruct::get_field); /// + /// # #[cfg(not(feature = "no_index"))] /// assert_eq!(engine.eval::("let a = new_ts(); a[2]")?, 3); /// # Ok(()) /// # } @@ -639,6 +640,7 @@ impl Engine { /// // Register an indexer. /// .register_indexer_get_result(TestStruct::get_field); /// + /// # #[cfg(not(feature = "no_index"))] /// assert_eq!(engine.eval::("let a = new_ts(); a[2]")?, 3); /// # Ok(()) /// # } @@ -707,6 +709,7 @@ impl Engine { /// // Register an indexer. /// .register_indexer_set(TestStruct::set_field); /// + /// # #[cfg(not(feature = "no_index"))] /// assert_eq!( /// engine.eval::("let a = new_ts(); a[2] = 42; a")?.fields[2], /// 42 @@ -777,6 +780,7 @@ impl Engine { /// // Register an indexer. /// .register_indexer_set_result(TestStruct::set_field); /// + /// # #[cfg(not(feature = "no_index"))] /// assert_eq!( /// engine.eval::("let a = new_ts(); a[2] = 42; a")?.fields[2], /// 42 @@ -851,6 +855,7 @@ impl Engine { /// // Register an indexer. /// .register_indexer_get_set(TestStruct::get_field, TestStruct::set_field); /// + /// # #[cfg(not(feature = "no_index"))] /// assert_eq!(engine.eval::("let a = new_ts(); a[2] = 42; a[2]")?, 42); /// # Ok(()) /// # }