diff --git a/src/api/run.rs b/src/api/run.rs index 8213791d..c6bd0b54 100644 --- a/src/api/run.rs +++ b/src/api/run.rs @@ -17,7 +17,7 @@ impl Engine { /// /// let engine = Engine::new(); /// - /// engine.run::("print(40 + 2);")?; + /// engine.run("print(40 + 2);")?; /// # Ok(()) /// # } /// ``` @@ -49,7 +49,7 @@ impl Engine { /// engine.run_with_scope(&mut scope, "x += 2; print(x);")?; /// /// // The variable in the scope is modified - /// assert_eq!(scope.get_value::("x").expect("variable x should exist"), 44); + /// assert_eq!(scope.get_value::("x").expect("variable x should exist"), 42); /// # Ok(()) /// # } /// ``` @@ -105,7 +105,7 @@ impl Engine { /// engine.run_ast_with_scope(&mut scope, &ast)?; /// /// // The variable in the scope is modified - /// assert_eq!(scope.get_value::("x").expect("variable x should exist"), 44); + /// assert_eq!(scope.get_value::("x").expect("variable x should exist"), 42); /// # Ok(()) /// # } /// ``` diff --git a/src/lib.rs b/src/lib.rs index 9808ddce..715dd979 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -166,15 +166,12 @@ type ExclusiveRange = std::ops::Range; /// An inclusive integer range. type InclusiveRange = std::ops::RangeInclusive; +#[allow(deprecated)] +pub use api::build_type::{CustomType, TypeBuilder}; #[cfg(not(feature = "no_std"))] #[cfg(not(target_family = "wasm"))] pub use api::files::{eval_file, run_file}; -pub use api::{ - build_type::{CustomType, TypeBuilder}, - eval::eval, - events::VarDefInfo, - run::run, -}; +pub use api::{eval::eval, events::VarDefInfo, run::run}; pub use ast::{FnAccess, AST}; pub use engine::{Engine, OP_CONTAINS, OP_EQUALS}; pub use eval::EvalContext;