Refactor.
This commit is contained in:
@@ -10,7 +10,7 @@ fn test_max_operations() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
engine.on_progress(|count| {
|
||||
if count % 100 == 0 {
|
||||
println!("{}", count);
|
||||
println!("{count}");
|
||||
}
|
||||
None
|
||||
});
|
||||
@@ -68,7 +68,7 @@ fn test_max_operations_functions() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
engine.on_progress(|count| {
|
||||
if count % 100 == 0 {
|
||||
println!("{}", count);
|
||||
println!("{count}");
|
||||
}
|
||||
None
|
||||
});
|
||||
@@ -124,7 +124,7 @@ fn test_max_operations_eval() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
engine.on_progress(|count| {
|
||||
if count % 100 == 0 {
|
||||
println!("{}", count);
|
||||
println!("{count}");
|
||||
}
|
||||
None
|
||||
});
|
||||
|
@@ -42,7 +42,7 @@ mod test {
|
||||
#[rhai_fn(name = "no_effect", set = "no_effect", pure)]
|
||||
pub fn no_effect(array: &mut Array, value: INT) {
|
||||
// array is not modified
|
||||
println!("Array = {:?}, Value = {}", array, value);
|
||||
println!("Array = {array:?}, Value = {value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ fn test_print_debug() -> Result<(), Box<EvalAltResult>> {
|
||||
);
|
||||
|
||||
for entry in logbook.read().unwrap().iter() {
|
||||
println!("{}", entry);
|
||||
println!("{entry}");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@@ -820,6 +820,6 @@ fn test_serde_blob() -> Result<(), Box<EvalAltResult>> {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
fn test_serde_json_borrowed_string() {
|
||||
let value = json!({ "a": "b" });
|
||||
println!("value: {:?}", value);
|
||||
println!("value: {value:?}");
|
||||
let _: Dynamic = serde_json::from_value(value).unwrap();
|
||||
}
|
||||
|
@@ -140,7 +140,7 @@ fn test_scope_eval() -> Result<(), Box<EvalAltResult>> {
|
||||
// Second invocation using the same state
|
||||
let result = engine.eval_with_scope::<INT>(&mut scope, "x")?;
|
||||
|
||||
println!("result: {}", result); // should print 966
|
||||
println!("result: {result}"); // should print 966
|
||||
|
||||
// Variable y is changed in the script
|
||||
assert_eq!(
|
||||
|
Reference in New Issue
Block a user