diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-11 16:57:41 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-11 17:03:56 +0900 |
| commit | 08a845acdd831a9de186696b9614ee397c8e7c68 (patch) | |
| tree | e8d388129d1ae54a434259ff6f63ec9292ff786d /crates/mozart/src/commands.rs | |
| parent | f641eb0202d974c765782f767f21aef2ea2fb4e9 (diff) | |
| download | php-mozart-08a845acdd831a9de186696b9614ee397c8e7c68.tar.gz php-mozart-08a845acdd831a9de186696b9614ee397c8e7c68.tar.zst php-mozart-08a845acdd831a9de186696b9614ee397c8e7c68.zip | |
change commands::*::execute() signatures
Diffstat (limited to 'crates/mozart/src/commands.rs')
| -rw-r--r-- | crates/mozart/src/commands.rs | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/crates/mozart/src/commands.rs b/crates/mozart/src/commands.rs index f31dd44..8232a86 100644 --- a/crates/mozart/src/commands.rs +++ b/crates/mozart/src/commands.rs @@ -192,39 +192,39 @@ pub enum Commands { Validate(validate::ValidateArgs), } -pub fn execute(command: &Commands) { - match command { - Commands::About(args) => about::execute(args), - Commands::Archive(args) => archive::execute(args), - Commands::Audit(args) => audit::execute(args), - Commands::Browse(args) => browse::execute(args), - Commands::Bump(args) => bump::execute(args), - Commands::CheckPlatformReqs(args) => check_platform_reqs::execute(args), - Commands::ClearCache(args) => clear_cache::execute(args), - Commands::Config(args) => config::execute(args), - Commands::CreateProject(args) => create_project::execute(args), - Commands::Depends(args) => depends::execute(args), - Commands::Diagnose(args) => diagnose::execute(args), - Commands::DumpAutoload(args) => dump_autoload::execute(args), - Commands::Exec(args) => exec::execute(args), - Commands::Fund(args) => fund::execute(args), - Commands::Global(args) => global::execute(args), - Commands::Init(args) => init::execute(args), - Commands::Install(args) => install::execute(args), - Commands::Licenses(args) => licenses::execute(args), - Commands::Outdated(args) => outdated::execute(args), - Commands::Prohibits(args) => prohibits::execute(args), - Commands::Reinstall(args) => reinstall::execute(args), - Commands::Remove(args) => remove::execute(args), - Commands::Repository(args) => repository::execute(args), - Commands::Require(args) => require::execute(args), - Commands::RunScript(args) => run_script::execute(args), - Commands::Search(args) => search::execute(args), - Commands::SelfUpdate(args) => self_update::execute(args), - Commands::Show(args) => show::execute(args), - Commands::Status(args) => status::execute(args), - Commands::Suggests(args) => suggests::execute(args), - Commands::Update(args) => update::execute(args), - Commands::Validate(args) => validate::execute(args), +pub fn execute(cli: &Cli) -> anyhow::Result<()> { + match &cli.command { + Commands::About(args) => about::execute(args, cli), + Commands::Archive(args) => archive::execute(args, cli), + Commands::Audit(args) => audit::execute(args, cli), + Commands::Browse(args) => browse::execute(args, cli), + Commands::Bump(args) => bump::execute(args, cli), + Commands::CheckPlatformReqs(args) => check_platform_reqs::execute(args, cli), + Commands::ClearCache(args) => clear_cache::execute(args, cli), + Commands::Config(args) => config::execute(args, cli), + Commands::CreateProject(args) => create_project::execute(args, cli), + Commands::Depends(args) => depends::execute(args, cli), + Commands::Diagnose(args) => diagnose::execute(args, cli), + Commands::DumpAutoload(args) => dump_autoload::execute(args, cli), + Commands::Exec(args) => exec::execute(args, cli), + Commands::Fund(args) => fund::execute(args, cli), + Commands::Global(args) => global::execute(args, cli), + Commands::Init(args) => init::execute(args, cli), + Commands::Install(args) => install::execute(args, cli), + Commands::Licenses(args) => licenses::execute(args, cli), + Commands::Outdated(args) => outdated::execute(args, cli), + Commands::Prohibits(args) => prohibits::execute(args, cli), + Commands::Reinstall(args) => reinstall::execute(args, cli), + Commands::Remove(args) => remove::execute(args, cli), + Commands::Repository(args) => repository::execute(args, cli), + Commands::Require(args) => require::execute(args, cli), + Commands::RunScript(args) => run_script::execute(args, cli), + Commands::Search(args) => search::execute(args, cli), + Commands::SelfUpdate(args) => self_update::execute(args, cli), + Commands::Show(args) => show::execute(args, cli), + Commands::Status(args) => status::execute(args, cli), + Commands::Suggests(args) => suggests::execute(args, cli), + Commands::Update(args) => update::execute(args, cli), + Commands::Validate(args) => validate::execute(args, cli), } } |
