From 397937979537e11e2df2084f19bdec7464fd2784 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Mon, 20 Oct 2025 15:35:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(cli):=20apply=20rustfmt=20?= =?UTF-8?q?formatting=20standards=20to=20CLI=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Apply cargo fmt to ensure consistent code formatting across CLI modules - Fix trailing whitespace in documentation comments - Optimize comment formatting and indentation - All clippy checks pass with no warnings - Documentation generates cleanly with strict nightly flags - All tests continue to pass after formatting changes --- src/cli/labels_cli.rs | 42 +++++------ src/cli/main.rs | 158 ++++++++++++++++++++-------------------- src/cli/messages_cli.rs | 142 ++++++++++++++++++------------------ src/cli/rules_cli.rs | 106 +++++++++++++-------------- 4 files changed, 224 insertions(+), 224 deletions(-) diff --git a/src/cli/labels_cli.rs b/src/cli/labels_cli.rs index 91b70c4..0b96004 100644 --- a/src/cli/labels_cli.rs +++ b/src/cli/labels_cli.rs @@ -43,32 +43,32 @@ use clap::Parser; use cull_gmail::{Error, GmailClient}; /// Command-line interface for Gmail label inspection and display. -/// +/// /// This structure represents the `labels` subcommand, which provides functionality /// to list and inspect all Gmail labels available in the user's account. The command /// requires no additional arguments and displays comprehensive label information. -/// +/// /// # Features -/// +/// /// - **Complete label listing**: Shows all labels including system and user-created labels /// - **ID mapping**: Displays both human-readable names and internal Gmail IDs /// - **Simple usage**: No configuration or arguments required /// - **Authentication handling**: Automatic OAuth2 authentication through GmailClient -/// +/// /// # Usage Context -/// +/// /// This command is typically used: /// 1. **Before creating queries**: To understand available labels for message filtering /// 2. **Before configuring rules**: To verify target labels exist /// 3. **For debugging**: To inspect label structure and IDs /// 4. **For exploration**: To understand Gmail organization structure -/// +/// /// # Examples -/// +/// /// ```rust,no_run /// use cull_gmail::cli::labels_cli::LabelsCli; /// use cull_gmail::GmailClient; -/// +/// /// # async fn example(client: GmailClient) -> Result<(), cull_gmail::Error> { /// let labels_cli = LabelsCli {}; /// labels_cli.run(client).await?; @@ -80,42 +80,42 @@ pub struct LabelsCli {} impl LabelsCli { /// Executes the labels command to display Gmail label information. - /// + /// /// This method coordinates the label inspection workflow by utilizing the /// Gmail client to retrieve and display all available labels in the user's account. /// The output includes both system labels (like INBOX, SENT) and user-created labels. - /// + /// /// # Arguments - /// + /// /// * `client` - Authenticated Gmail client for API communication - /// + /// /// # Returns - /// + /// /// Returns `Result<(), Error>` indicating success or failure of the operation. - /// + /// /// # Operation Details - /// + /// /// The function performs the following steps: /// 1. **Label Retrieval**: Fetches all labels from the Gmail API /// 2. **Format Processing**: Organizes labels for display /// 3. **Display Output**: Shows labels with names and IDs - /// + /// /// # Output Format - /// + /// /// Labels are displayed in the format: /// ```text ///