workspacer-cli 0.1.2

A versatile command-line interface for Rust workspace management, providing comprehensive controls for crate analysis, import formatting, cleanup, dependency checks, and more.
Documentation
// ---------------- [ File: workspacer-cli/src/format.rs ]
crate::ix!();

/// Format imports in all crates or a single crate
#[derive(Debug, StructOpt)]
pub enum FormatSubcommand {
    /// Format the imports in one specific crate
    Imports(FormatImportsCommand),

    /// Format the imports in all crates of this workspace
    AllImports(FormatAllImportsCommand),
}

impl FormatSubcommand {
    pub async fn run(&self) -> Result<(), WorkspaceError> {
        match self {
            FormatSubcommand::Imports(cmd) => cmd.run().await,
            FormatSubcommand::AllImports(cmd) => cmd.run().await,
        }
    }
}