From ee4b5435a4fa550372e456f60557120ff203caa0 Mon Sep 17 00:00:00 2001 From: Sofia Date: Fri, 20 Mar 2026 18:27:41 +0200 Subject: [PATCH] Fix doctest --- examples/test.rs | 4 ++-- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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(); //!