Update README.md
This commit is contained in:
parent
6a3b6ebe95
commit
53be2c9a2a
@ -113,7 +113,7 @@ fn main() {
|
||||
let mut engine = Engine::new();
|
||||
|
||||
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);
|
||||
|
||||
if let Ok(result) = engine.eval::<i32>("add(40, 2)") {
|
||||
println!("Answer: {}", *result); // prints 42
|
||||
println!("Answer: {}", result); // prints 42
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user