diff --git a/src/bin/uudoc.rs b/src/bin/uudoc.rs index ab0043331..e506b196e 100644 --- a/src/bin/uudoc.rs +++ b/src/bin/uudoc.rs @@ -291,13 +291,7 @@ fn main() -> io::Result<()> { } println!("Writing to utils"); - let hashsum_cmd = utils - .iter() - .find(|n| *n.0 == "hashsum") - .unwrap() - .clone() - .1 - .1; + let hashsum_cmd = (*utils.iter().find(|n| *n.0 == "hashsum").unwrap()).1.1; for (&name, (_, command)) in utils { let (utils_name, usage_name, command) = match name { "[" => { @@ -428,14 +422,14 @@ impl MDWriter<'_, '_> { }; for element in elements { if let TextElement { ref value } = element { - result.push_str(&value); + result.push_str(value); } if let Placeable { expression: Expression::Inline(InlineExpression::StringLiteral { ref value }), } = element { - result.push_str(&value); + result.push_str(value); } } return Some(result); diff --git a/tests/test_uudoc.rs b/tests/test_uudoc.rs index 2c4a2a311..1023697ef 100644 --- a/tests/test_uudoc.rs +++ b/tests/test_uudoc.rs @@ -91,8 +91,7 @@ test ``` ", ), - "{} does not contains the required text", - correct_path + "{correct_path} does not contains the required text" ); } @@ -116,7 +115,7 @@ fn uudoc_check_sums() { let output_path = pages .iter() .find(|one_line| one_line.contains(one_sum)) - .expect(&format!("{one_sum} was not generated in {pages:?}")); + .unwrap(); let (correct_path, content) = get_doc_file_from_output(output_path); let formatted = format!("```\n{one_sum} [OPTIONS]... [FILE]...\n```"); assert!(