refactor: rename some stuff

This commit is contained in:
RafayAhmad7548 2026-08-31 02:03:11 +05:00
parent d383d8027c
commit 712b95e24d
Signed by: RafayAhmad
SSH key fingerprint: SHA256:WURX8viobA1uawb4dWM3LqYrY+XPcZcXhAXAlrYdhtE

View file

@ -33,7 +33,7 @@ struct Mcsm {
#[derive(Subcommand)]
enum Commands {
Init { name: String },
Create { project_name: String },
}
#[tokio::main]
@ -41,8 +41,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
let mcsm = Mcsm::parse();
match mcsm.command {
Commands::Init { name: project_name } => {
tokio::fs::create_dir(&project_name).await?;
Commands::Create { project_name } => {
tokio::fs::create_dir_all(&project_name).await?;
std::env::set_current_dir(&project_name)?;
let mut config_file = tokio::fs::File::create("mcsm.toml").await?;