From 476f5d245e6cf5128fa669fbf82d31799f9700d8 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Wed, 8 Oct 2025 12:50:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(rules=5Fcli):=20add=20remove?= =?UTF-8?q?=20command=20to=20rules=20cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add remove command to rules cli - create rm_cli module --- src/rules_cli.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rules_cli.rs b/src/rules_cli.rs index d81215c..59477ec 100644 --- a/src/rules_cli.rs +++ b/src/rules_cli.rs @@ -2,8 +2,10 @@ use clap::{Parser, Subcommand}; use cull_gmail::{Config, Error}; mod add_cli; +mod rm_cli; use add_cli::AddCli; +use rm_cli::RmCli; #[derive(Debug, Parser)] pub struct RulesCli { @@ -17,7 +19,7 @@ impl RulesCli { match &self.command { RulesCommands::List => config.list_rules(), RulesCommands::Add(add_cli) => add_cli.run(config), - RulesCommands::Remove => todo!(), + RulesCommands::Remove(rm_cli) => rm_cli.run(config), RulesCommands::Update => todo!(), } } @@ -33,7 +35,7 @@ pub enum RulesCommands { Add(AddCli), /// Remove a rule from the config file #[clap(name = "remove", alias = "rm")] - Remove, + Remove(RmCli), /// Update a rule in the config file #[clap(name = "update")] Update,