From cd6858f4bd6812f935543e775bc1c249fc7c25e4 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 07:12:33 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(cli):=20restructu?= =?UTF-8?q?re=20rules=20CLI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - move rules_cli.rs to config_cli/rules_cli.rs - remove update command --- src/{ => config_cli}/rules_cli.rs | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) rename src/{ => config_cli}/rules_cli.rs (87%) diff --git a/src/rules_cli.rs b/src/config_cli/rules_cli.rs similarity index 87% rename from src/rules_cli.rs rename to src/config_cli/rules_cli.rs index 59477ec..2d00da2 100644 --- a/src/rules_cli.rs +++ b/src/config_cli/rules_cli.rs @@ -7,6 +7,19 @@ mod rm_cli; use add_cli::AddCli; use rm_cli::RmCli; +#[derive(Debug, Subcommand)] +pub enum RulesCommands { + /// List the rules configured and saved in the config file + #[clap(name = "list")] + List, + /// Add a rules to the config file + #[clap(name = "add")] + Add(AddCli), + /// Remove a rule from the config file + #[clap(name = "remove", alias = "rm")] + Remove(RmCli), +} + #[derive(Debug, Parser)] pub struct RulesCli { /// Configuration commands @@ -20,23 +33,6 @@ impl RulesCli { RulesCommands::List => config.list_rules(), RulesCommands::Add(add_cli) => add_cli.run(config), RulesCommands::Remove(rm_cli) => rm_cli.run(config), - RulesCommands::Update => todo!(), } } } - -#[derive(Debug, Subcommand)] -pub enum RulesCommands { - /// List the rules configured and saved in the config file - #[clap(name = "list")] - List, - /// Add a rules to the config file - #[clap(name = "add")] - Add(AddCli), - /// Remove a rule from the config file - #[clap(name = "remove", alias = "rm")] - Remove(RmCli), - /// Update a rule in the config file - #[clap(name = "update")] - Update, -}