treewide: general cleanup
Finally had the time to clean up after myself. Does a bunch of things, without breakage as far as I'm aware. I've removed around 20 unnecessary clones, and simplified the architechture a little bit. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I4d22337b997a3bf5b0593e6068cd1bd86a6a6964
This commit is contained in:
parent
e783178493
commit
34976a66d2
6 changed files with 87 additions and 86 deletions
46
src/main.rs
46
src/main.rs
|
|
@ -59,15 +59,15 @@ async fn main() -> Result<(), PakkerError> {
|
|||
},
|
||||
Commands::AddPrj(args) => {
|
||||
cli::commands::add_prj::execute(
|
||||
args.curseforge.clone(),
|
||||
args.modrinth.clone(),
|
||||
args.github.clone(),
|
||||
args.curseforge,
|
||||
args.modrinth,
|
||||
args.github,
|
||||
args.project_type,
|
||||
args.side,
|
||||
args.strategy,
|
||||
args.redistributable,
|
||||
args.subpath.clone(),
|
||||
args.aliases.clone(),
|
||||
args.subpath,
|
||||
args.aliases,
|
||||
args.export,
|
||||
args.no_deps,
|
||||
args.yes,
|
||||
|
|
@ -121,12 +121,12 @@ async fn main() -> Result<(), PakkerError> {
|
|||
.await
|
||||
},
|
||||
Commands::Credentials(args) => {
|
||||
match &args.subcommand {
|
||||
match args.subcommand {
|
||||
Some(cli::CredentialsSubcommand::Set(set_args)) => {
|
||||
cli::commands::credentials_set::execute(
|
||||
set_args.cf_api_key.clone(),
|
||||
set_args.modrinth_token.clone(),
|
||||
set_args.gh_access_token.clone(),
|
||||
set_args.cf_api_key,
|
||||
set_args.modrinth_token,
|
||||
set_args.gh_access_token,
|
||||
)
|
||||
},
|
||||
None => {
|
||||
|
|
@ -139,34 +139,34 @@ async fn main() -> Result<(), PakkerError> {
|
|||
}
|
||||
},
|
||||
Commands::Cfg(args) => {
|
||||
match &args.subcommand {
|
||||
match args.subcommand {
|
||||
Some(cli::CfgSubcommand::Prj(prj_args)) => {
|
||||
cli::commands::cfg_prj::execute(
|
||||
&config_path,
|
||||
&lockfile_path,
|
||||
prj_args.project.clone(),
|
||||
prj_args.project,
|
||||
prj_args.r#type.as_deref(),
|
||||
prj_args.side.as_deref(),
|
||||
prj_args.update_strategy.as_deref(),
|
||||
prj_args.redistributable,
|
||||
prj_args.subpath.clone(),
|
||||
prj_args.add_alias.clone(),
|
||||
prj_args.remove_alias.clone(),
|
||||
prj_args.subpath,
|
||||
prj_args.add_alias,
|
||||
prj_args.remove_alias,
|
||||
prj_args.export,
|
||||
)
|
||||
},
|
||||
None => {
|
||||
cli::commands::cfg::execute(
|
||||
&config_path,
|
||||
args.name.clone(),
|
||||
args.version.clone(),
|
||||
args.description.clone(),
|
||||
args.author.clone(),
|
||||
args.mods_path.clone(),
|
||||
args.resource_packs_path.clone(),
|
||||
args.data_packs_path.clone(),
|
||||
args.worlds_path.clone(),
|
||||
args.shaders_path.clone(),
|
||||
args.name,
|
||||
args.version,
|
||||
args.description,
|
||||
args.author,
|
||||
args.mods_path,
|
||||
args.resource_packs_path,
|
||||
args.data_packs_path,
|
||||
args.worlds_path,
|
||||
args.shaders_path,
|
||||
)
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue