From 2b29382d5ec16745c6aeda85363a809101867fb9 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Tue, 21 Oct 2025 22:17:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Apply=20cargo=20fmt=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli/init_cli.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/init_cli.rs b/src/cli/init_cli.rs index e23e175..cefc275 100644 --- a/src/cli/init_cli.rs +++ b/src/cli/init_cli.rs @@ -624,10 +624,10 @@ impl InitCli { rules_dir: &Path, ) -> Result<()> { // Create rules directory if it doesn't exist and hasn't been planned already - let already_planned = operations.iter().any(|op| { - matches!(op, Operation::CreateDir { path, .. } if path == rules_dir) - }); - + let already_planned = operations + .iter() + .any(|op| matches!(op, Operation::CreateDir { path, .. } if path == rules_dir)); + if !rules_dir.exists() && !already_planned { operations.push(Operation::CreateDir { path: rules_dir.to_path_buf(),