Skip to content

Commit 92bba2f

Browse files
committed
clippy
1 parent 1ab074a commit 92bba2f

File tree

1 file changed

+2
-4
lines changed
  • tools/build-example-pages/src

1 file changed

+2
-4
lines changed

tools/build-example-pages/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ fn parse_examples(panic_on_missing: bool) -> Vec<Example> {
6767
.iter()
6868
.flat_map(|val| {
6969
let technical_name = val["name"].as_str().unwrap().to_string();
70-
if panic_on_missing {
71-
if metadatas.get(&technical_name).is_none() {
72-
panic!("Missing metadata for example {}", technical_name);
73-
}
70+
if panic_on_missing && metadatas.get(&technical_name).is_none() {
71+
panic!("Missing metadata for example {}", technical_name);
7472
}
7573

7674
if metadatas

0 commit comments

Comments
 (0)