Update README.md

This commit is contained in:
Jonathan Turner 2016-03-26 13:45:24 -07:00
parent 6a3b6ebe95
commit 53be2c9a2a

View File

@ -113,7 +113,7 @@ fn main() {
let mut engine = Engine::new(); let mut engine = Engine::new();
if let Ok(result) = engine.eval::<i32>("40 + 2") { if let Ok(result) = engine.eval::<i32>("40 + 2") {
println!("Answer: {}", *result); // prints 42 println!("Answer: {}", result); // prints 42
} }
} }
``` ```
@ -135,7 +135,7 @@ fn main() {
engine.register_fn("add", add); engine.register_fn("add", add);
if let Ok(result) = engine.eval::<i32>("add(40, 2)") { if let Ok(result) = engine.eval::<i32>("add(40, 2)") {
println!("Answer: {}", *result); // prints 42 println!("Answer: {}", result); // prints 42
} }
} }
``` ```