Replace - with –

This commit is contained in:
Stephen Chung
2020-12-29 23:01:34 +08:00
parent a45876856d
commit db5b855dea
51 changed files with 149 additions and 149 deletions

View File

@@ -1,4 +1,4 @@
`Scope` - Initializing and Maintaining State
`Scope` – Initializing and Maintaining State
=================================================
{{#include ../links.md}}
@@ -37,7 +37,7 @@ scope
// First invocation
engine.eval_with_scope::<()>(&mut scope, r"
let x = 4 + 5 - y + z + MY_NUMBER + s.len;
let x = 4 + 5 &ndash; y + z + MY_NUMBER + s.len;
y = 1;
")?;
@@ -46,7 +46,7 @@ let result = engine.eval_with_scope::<i64>(&mut scope, "x")?;
println!("result: {}", result); // prints 1102
// Variable y is changed in the script - read it with 'get_value'
// Variable y is changed in the script &ndash; read it with 'get_value'
assert_eq!(scope.get_value::<i64>("y").expect("variable y should exist"), 1);
// We can modify scope variables directly with 'set_value'