From 5c72b13efbf420ba3d5bfca237045b4535239a85 Mon Sep 17 00:00:00 2001 From: Vhyrro Date: Sun, 30 Jun 2024 19:58:16 +0200 Subject: [PATCH] refactor(bin): `List` -> `ListCmd` --- rocks-bin/src/list.rs | 4 ++-- rocks-bin/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rocks-bin/src/list.rs b/rocks-bin/src/list.rs index 72b4c801..9ded0c73 100644 --- a/rocks-bin/src/list.rs +++ b/rocks-bin/src/list.rs @@ -5,14 +5,14 @@ use rocks_lib::{config::Config, tree::Tree}; use text_trees::{FormatCharacters, StringTreeNode, TreeFormatting}; #[derive(Args)] -pub struct List { +pub struct ListCmd { #[arg(long)] outdated: bool, #[arg(long)] porcelain: bool, } -pub fn list(list_data: List, config: &Config) -> Result<()> { +pub fn list_installed(list_data: ListCmd, config: &Config) -> Result<()> { let tree = Tree::new( &config.tree, config diff --git a/rocks-bin/src/main.rs b/rocks-bin/src/main.rs index d650c493..b0227794 100644 --- a/rocks-bin/src/main.rs +++ b/rocks-bin/src/main.rs @@ -109,7 +109,7 @@ enum Commands { /// Check syntax of a rockspec. Lint, /// List currently installed rocks. - List(list::List), + List(list::ListCmd), /// Compile package in current directory using a rockspec. Make, /// Auto-write a rockspec for a new version of the rock. @@ -177,7 +177,7 @@ async fn main() { rockspec::write_rockspec(rockspec_data).await.unwrap() } Commands::Build(build_data) => build::build(build_data, &config).unwrap(), - Commands::List(list_data) => list::list(list_data, &config).unwrap(), + Commands::List(list_data) => list::list_installed(list_data, &config).unwrap(), _ => unimplemented!(), }, None => {