From 92bba2f75572d87904cbedf05ffa26db8111accf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 15 Jun 2022 02:39:23 +0200 Subject: [PATCH] clippy --- tools/build-example-pages/src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/build-example-pages/src/main.rs b/tools/build-example-pages/src/main.rs index a0839a70a58aad..1ffcc623e3d40e 100644 --- a/tools/build-example-pages/src/main.rs +++ b/tools/build-example-pages/src/main.rs @@ -67,10 +67,8 @@ fn parse_examples(panic_on_missing: bool) -> Vec { .iter() .flat_map(|val| { let technical_name = val["name"].as_str().unwrap().to_string(); - if panic_on_missing { - if metadatas.get(&technical_name).is_none() { - panic!("Missing metadata for example {}", technical_name); - } + if panic_on_missing && metadatas.get(&technical_name).is_none() { + panic!("Missing metadata for example {}", technical_name); } if metadatas