diff options
| author | Fuwn <[email protected]> | 2022-02-08 23:14:45 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-09 07:46:05 +0000 |
| commit | 75a1723f5622ef33edf7270b4388aa7240cf3e53 (patch) | |
| tree | 29501f3a986f4294f21fcf947601d3a3e82d35ab | |
| parent | feat(cli): config compiler show subcommand (diff) | |
| download | divina-75a1723f5622ef33edf7270b4388aa7240cf3e53.tar.xz divina-75a1723f5622ef33edf7270b4388aa7240cf3e53.zip | |
chore(cli): rename matches for readability
| -rw-r--r-- | crates/divina/src/cli.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/divina/src/cli.rs b/crates/divina/src/cli.rs index c256927..5cc273e 100644 --- a/crates/divina/src/cli.rs +++ b/crates/divina/src/cli.rs @@ -47,23 +47,23 @@ pub fn execute(divina: &mut crate::Divina) { let matches = cli().get_matches(); match matches.subcommand() { - ("init", Some(s_matches)) => { - let repository = s_matches + ("init", Some(init_matches)) => { + let repository = init_matches .value_of("git") .unwrap_or("https://github.com/divinaland/init.git"); - let path = s_matches.value_of("path").unwrap_or("."); + let path = init_matches.value_of("path").unwrap_or("."); divina_git::clone(repository, &format!("./{}", path)) .expect("!! could to clone init repository, perhaps the repository is invalid ?"); } - ("build", Some(_s_matches)) => { + ("build", Some(_build_matches)) => { divina .compiler .find_sources(&divina.expose_config().clone()) .compile() .link(); } - ("clean", Some(_s_matches)) => + ("clean", Some(_clean_matches)) => if std::path::Path::new("out/").exists() { println!(":: removing directory 'out/'"); std::fs::remove_dir_all("out/") @@ -71,12 +71,12 @@ pub fn execute(divina: &mut crate::Divina) { } else { println!(":: directory 'out/' does not exist"); }, - ("config", Some(s_matches)) => - match s_matches.subcommand() { + ("config", Some(config_matches)) => + match config_matches.subcommand() { ("show", _) => divina.print_config(), ("validate", _) => println!(":: no issues found"), - ("compiler", Some(s_s_matches)) => - match s_s_matches.subcommand() { + ("compiler", Some(config_compiler_matches)) => + match config_compiler_matches.subcommand() { ("show", _) => { let _ = divina .compiler |