From b8a473c978244a3b27b81b2e5de5bd49f4335a14 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 14:40:10 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20chore(config=5Fcli):=20remove=20?= =?UTF-8?q?add=5Fcli=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove unused add_cli module and its dependencies --- src/config_cli/label_cli/add_cli.rs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/config_cli/label_cli/add_cli.rs diff --git a/src/config_cli/label_cli/add_cli.rs b/src/config_cli/label_cli/add_cli.rs deleted file mode 100644 index ac74eb9..0000000 --- a/src/config_cli/label_cli/add_cli.rs +++ /dev/null @@ -1,23 +0,0 @@ -use clap::Parser; - -use cull_gmail::{Config, Error, Result}; - -#[derive(Debug, Parser)] -pub struct AddCli { - /// Id of the rule on which action applies - #[clap(short, long)] - id: usize, - /// Label to add to the rule - #[clap(short, long)] - label: String, -} - -impl AddCli { - pub fn run(&self, mut config: Config) -> Result<()> { - if config.get_rule(self.id).is_none() { - return Err(Error::RuleNotFound(self.id)); - } - - config.add_label_to_rule(self.id, &self.label) - } -}