Replace String::from("...") with "...".into().
This commit is contained in:
parent
2f78626a21
commit
6aa0be546f
@ -66,7 +66,7 @@ fn test_side_effects_command() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
#[test]
|
||||
fn test_side_effects_print() -> Result<(), Box<EvalAltResult>> {
|
||||
let result = Arc::new(RwLock::new(String::from("")));
|
||||
let result = Arc::new(RwLock::new(String::new()));
|
||||
|
||||
let mut engine = Engine::new();
|
||||
|
||||
|
@ -53,8 +53,8 @@ fn test_string() -> Result<(), Box<EvalAltResult>> {
|
||||
fn test_string_dynamic() -> Result<(), Box<EvalAltResult>> {
|
||||
let engine = Engine::new();
|
||||
let mut scope = Scope::new();
|
||||
scope.push("x", Dynamic::from("foo"));
|
||||
scope.push("y", String::from("foo"));
|
||||
scope.push("x", "foo");
|
||||
scope.push("y", "foo");
|
||||
scope.push("z", "foo");
|
||||
|
||||
assert!(engine.eval_with_scope::<bool>(&mut scope, r#"x == "foo""#)?);
|
||||
|
Loading…
Reference in New Issue
Block a user