clippy: use clone_from rather than clone
This commit is contained in:
@@ -191,7 +191,7 @@ impl Machine {
|
|||||||
printer.quoted = true;
|
printer.quoted = true;
|
||||||
printer.max_depth = 1000; // NOTE: set this to 0 for unbounded depth
|
printer.max_depth = 1000; // NOTE: set this to 0 for unbounded depth
|
||||||
printer.double_quotes = true;
|
printer.double_quotes = true;
|
||||||
printer.var_names = var_names.clone();
|
printer.var_names.clone_from(&var_names);
|
||||||
|
|
||||||
let outputter = printer.print();
|
let outputter = printer.print();
|
||||||
|
|
||||||
@@ -488,12 +488,8 @@ mod tests {
|
|||||||
} else if let Some(result) = block.strip_prefix("result") {
|
} else if let Some(result) = block.strip_prefix("result") {
|
||||||
i += 1;
|
i += 1;
|
||||||
if let Some(Ok(ref last_result)) = last_result {
|
if let Some(Ok(ref last_result)) = last_result {
|
||||||
println!(
|
println!("\n\n=====Result No. {i}=======\n{last_result}\n===============");
|
||||||
"\n\n=====Result No. {}=======\n{}\n===============",
|
assert_eq!(last_result.to_string(), result.to_string().trim(),)
|
||||||
i,
|
|
||||||
last_result.to_string().trim()
|
|
||||||
);
|
|
||||||
assert_eq!(last_result.to_string().trim(), result.to_string().trim(),)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user