From 7c397c84d975bac091c6786c49cd86eebe4e9617 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Mon, 13 Oct 2025 17:02:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(cli):=20rename=20?= =?UTF-8?q?Processor=20to=20RuleProcessor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - rename `Processor` struct to `RuleProcessor` for better clarity - update all references to reflect the change --- src/cli/run_cli.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/cli/run_cli.rs b/src/cli/run_cli.rs index 3c795d7..5a69949 100644 --- a/src/cli/run_cli.rs +++ b/src/cli/run_cli.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cull_gmail::{Config, EolAction, GmailClient, Processor, Result}; +use cull_gmail::{Config, EolAction, GmailClient, Result, RuleProcessor}; #[derive(Debug, Parser)] pub struct RunCli { @@ -26,7 +26,7 @@ impl RunCli { log::info!("Executing rule `#{}` for label `{label}`", rule.describe()); - let mut builder = Processor::builder(client, rule); + let mut builder = RuleProcessor::builder(client, rule); let processor = builder.set_execute(self.execute).build(); let Some(action) = processor.action() else { @@ -40,7 +40,12 @@ impl RunCli { Ok(()) } - async fn execute_action<'a>(&self, processor: Processor<'a>, action: EolAction, label: &str) { + async fn execute_action<'a>( + &self, + processor: RuleProcessor<'a>, + action: EolAction, + label: &str, + ) { match action { EolAction::Trash => { if !self.skip_trash {