From b01543a8b92da790650dcb172f2d222ec3b08ff8 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sun, 25 Aug 2024 17:20:12 +0200 Subject: [PATCH] chore: remove lib Signed-off-by: kjuulh --- crates/cuddle/src/lib.rs | 4 ---- crates/cuddle/src/main.rs | 13 +++++++------ 2 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 crates/cuddle/src/lib.rs diff --git a/crates/cuddle/src/lib.rs b/crates/cuddle/src/lib.rs deleted file mode 100644 index f8813eb..0000000 --- a/crates/cuddle/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -mod plan; -mod project; -mod schema_validator; -mod state; diff --git a/crates/cuddle/src/main.rs b/crates/cuddle/src/main.rs index d6c2fdf..c253b38 100644 --- a/crates/cuddle/src/main.rs +++ b/crates/cuddle/src/main.rs @@ -1,5 +1,5 @@ use cuddle_state::Cuddle; -use state::{validated_project::Project, ValidatedState}; +use state::ValidatedState; mod cuddle_state; mod plan; @@ -37,7 +37,7 @@ impl Cli { Self { cli, cuddle } } - pub async fn setup(mut self) -> anyhow::Result { + pub async fn setup(self) -> anyhow::Result { let s = self .add_default() .await? @@ -52,16 +52,17 @@ impl Cli { Ok(s) } - pub async fn execute(mut self) -> anyhow::Result<()> { + pub async fn execute(self) -> anyhow::Result<()> { match self .cli .get_matches_from(std::env::args()) .subcommand() .ok_or(anyhow::anyhow!("failed to find subcommand"))? { - ("do", args) => { + ("do", _args) => { tracing::debug!("executing do"); } + ("get", _args) => {} _ => {} } @@ -77,7 +78,7 @@ impl Cli { Ok(self) } - async fn add_project_commands(mut self) -> anyhow::Result { + async fn add_project_commands(self) -> anyhow::Result { if let Some(project) = self.cuddle.state.project.as_ref() { // Add project level commands } @@ -85,7 +86,7 @@ impl Cli { Ok(self) } - async fn add_plan_commands(mut self) -> anyhow::Result { + async fn add_plan_commands(self) -> anyhow::Result { if let Some(plan) = self.cuddle.state.plan.as_ref() { // Add plan level commands }