From 1014b975cd958dfbc439e88984c61325362cf971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Thu, 7 Aug 2025 20:55:28 +0200 Subject: [PATCH] Fix new clippy warnings --- testing/tests/ui.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/testing/tests/ui.rs b/testing/tests/ui.rs index f103da2f..e3e2e472 100644 --- a/testing/tests/ui.rs +++ b/testing/tests/ui.rs @@ -18,13 +18,13 @@ fn ui() { }; let target_crate_root = manifest_dir.join("../target/tests/trybuild/askama_testing"); - if !target_crate_root.exists() { - if let Err(err) = std::fs::create_dir_all(&target_crate_root) { - panic!( - "failed to create folder `{}`: {err:?}", - target_crate_root.display() - ); - } + if !target_crate_root.exists() + && let Err(err) = std::fs::create_dir_all(&target_crate_root) + { + panic!( + "failed to create folder `{}`: {err:?}", + target_crate_root.display() + ); } let target_crate_root = target_crate_root.canonicalize().unwrap(); @@ -46,10 +46,10 @@ fn ui() { // soft-link toml configs for entry in manifest_dir.read_dir().unwrap().filter_map(Result::ok) { - if let Some(name) = entry.file_name().to_str() { - if name != "Cargo.toml" || !name.ends_with(".toml") { - symlink(name); - } + if let Some(name) = entry.file_name().to_str() + && (name != "Cargo.toml" || !name.ends_with(".toml")) + { + symlink(name); } } }