From 22ea4d75a1468e611318c8f1b087000c4e1fdb7f Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Thu, 2 Mar 2023 08:52:49 +0100 Subject: [PATCH] fix: Remove obsolete CLI parameter With Oodle being linked statically, there is no need for a parameter to speficy the library location. --- crates/dtmm/src/main.rs | 6 ------ crates/dtmt/src/cmd/build.rs | 24 ++++++++---------------- crates/dtmt/src/cmd/bundle/mod.rs | 8 +------- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/crates/dtmm/src/main.rs b/crates/dtmm/src/main.rs index 9ce6192..a89dde5 100644 --- a/crates/dtmm/src/main.rs +++ b/crates/dtmm/src/main.rs @@ -37,12 +37,6 @@ fn main() -> Result<()> { tracing::trace!(default_config_path = %default_config_path.display()); let matches = command!() - .arg(Arg::new("oodle").long("oodle").help( - "The oodle library to load. This may either be:\n\ - - A library name that will be searched for in the system's default paths.\n\ - - A file path relative to the current working directory.\n\ - - An absolute file path.", - )) .arg( Arg::new("config") .long("config") diff --git a/crates/dtmt/src/cmd/build.rs b/crates/dtmt/src/cmd/build.rs index f077094..97f192c 100644 --- a/crates/dtmt/src/cmd/build.rs +++ b/crates/dtmt/src/cmd/build.rs @@ -17,23 +17,15 @@ use crate::mods::archive::Archive; const PROJECT_CONFIG_NAME: &str = "dtmt.cfg"; pub(crate) fn command_definition() -> Command { - Command::new("build") - .about("Build a project") - .arg( - Arg::new("directory") - .required(false) - .value_parser(value_parser!(PathBuf)) - .help( - "The path to the project to build. \ + Command::new("build").about("Build a project").arg( + Arg::new("directory") + .required(false) + .value_parser(value_parser!(PathBuf)) + .help( + "The path to the project to build. \ If omitted, dtmt will search from the current working directory upward.", - ), - ) - .arg(Arg::new("oodle").long("oodle").help( - "The oodle library to load. This may either be:\n\ - - A library name that will be searched for in the system's default paths.\n\ - - A file path relative to the current working directory.\n\ - - An absolute file path.", - )) + ), + ) } #[tracing::instrument] diff --git a/crates/dtmt/src/cmd/bundle/mod.rs b/crates/dtmt/src/cmd/bundle/mod.rs index 6baf860..0e7c9f7 100644 --- a/crates/dtmt/src/cmd/bundle/mod.rs +++ b/crates/dtmt/src/cmd/bundle/mod.rs @@ -1,4 +1,4 @@ -use clap::{Arg, ArgMatches, Command}; +use clap::{ArgMatches, Command}; use color_eyre::eyre::Result; mod decompress; @@ -10,12 +10,6 @@ pub(crate) fn command_definition() -> Command { Command::new("bundle") .subcommand_required(true) .about("Manipulate the game's bundle files") - .arg(Arg::new("oodle").long("oodle").help( - "The oodle library to load. This may either be:\n\ - - A library name that will be searched for in the system's default paths.\n\ - - A file path relative to the current working directory.\n\ - - An absolute file path.", - )) .subcommand(decompress::command_definition()) .subcommand(extract::command_definition()) .subcommand(inject::command_definition())