Skip to content

Commit ce44b45

Browse files
committed
clippy
1 parent 0f10e21 commit ce44b45

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/bin/uudoc.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,7 @@ fn main() -> io::Result<()> {
291291
}
292292

293293
println!("Writing to utils");
294-
let hashsum_cmd = utils
295-
.iter()
296-
.find(|n| *n.0 == "hashsum")
297-
.unwrap()
298-
.clone()
299-
.1
300-
.1;
294+
let hashsum_cmd = (*utils.iter().find(|n| *n.0 == "hashsum").unwrap()).1.1;
301295
for (&name, (_, command)) in utils {
302296
let (utils_name, usage_name, command) = match name {
303297
"[" => {
@@ -428,14 +422,14 @@ impl MDWriter<'_, '_> {
428422
};
429423
for element in elements {
430424
if let TextElement { ref value } = element {
431-
result.push_str(&value);
425+
result.push_str(value);
432426
}
433427
if let Placeable {
434428
expression:
435429
Expression::Inline(InlineExpression::StringLiteral { ref value }),
436430
} = element
437431
{
438-
result.push_str(&value);
432+
result.push_str(value);
439433
}
440434
}
441435
return Some(result);

tests/test_uudoc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ test
9191
```
9292
",
9393
),
94-
"{} does not contains the required text",
95-
correct_path
94+
"{correct_path} does not contains the required text"
9695
);
9796
}
9897

@@ -116,7 +115,7 @@ fn uudoc_check_sums() {
116115
let output_path = pages
117116
.iter()
118117
.find(|one_line| one_line.contains(one_sum))
119-
.expect(&format!("{one_sum} was not generated in {pages:?}"));
118+
.unwrap();
120119
let (correct_path, content) = get_doc_file_from_output(output_path);
121120
let formatted = format!("```\n{one_sum} [OPTIONS]... [FILE]...\n```");
122121
assert!(

0 commit comments

Comments
 (0)