diff --git a/examples/test.rs b/examples/test.rs index c717331..15bf789 100644 --- a/examples/test.rs +++ b/examples/test.rs @@ -39,8 +39,8 @@ fn main() { let mut vm = VirtualMachine::default(); - vm.set_global("max".into(), Max.into()); - vm.set_global("print".into(), Print.into()); + vm.set_global("max".into(), Max.into()).unwrap(); + vm.set_global("print".into(), Print.into()).unwrap(); dbg!(&compilation_unit); diff --git a/src/lib.rs b/src/lib.rs index bb547de..e90b83a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ //! let compilation_unit = compile("print(\"hello\")", None).unwrap(); //! //! let mut vm = vm::VirtualMachine::default(); -//! vm.set_global("print".into(), Print.into()); +//! vm.set_global("print".into(), Print.into()).unwrap(); //! //! let mut runner = compilation_unit.with_virtual_machine(&mut vm).execute(); //!