From bb9b95fbd1feae2a035654eefd2fdc03bd94e1fe Mon Sep 17 00:00:00 2001 From: dxps Date: Fri, 6 Jan 2023 17:13:08 +0200 Subject: [PATCH] chore: typos --- src/cli/create/mod.rs | 4 ++-- src/cli/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/create/mod.rs b/src/cli/create/mod.rs index 9e405ed2f..228b87be9 100644 --- a/src/cli/create/mod.rs +++ b/src/cli/create/mod.rs @@ -16,7 +16,7 @@ pub struct Create { impl Create { pub fn create(self) -> Result<()> { - if Self::name_vaild_check(self.name.clone()) { + if Self::name_valid_check(self.name.clone()) { return custom_error!("ā¯—Unsupported project name."); } @@ -77,7 +77,7 @@ impl Create { Ok(()) } - fn name_vaild_check(name: String) -> bool { + fn name_valid_check(name: String) -> bool { let r = Regex::new(r"^[a-zA-Z][a-zA-Z0-9\-_]$").unwrap(); r.is_match(&name) } diff --git a/src/cli/mod.rs b/src/cli/mod.rs index ade829aca..44888ac57 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -78,7 +78,7 @@ impl Commands { match self { Commands::Build(_) => "build", Commands::Translate(_) => "translate", - Commands::Serve(_) => "sevre", + Commands::Serve(_) => "serve", Commands::Create(_) => "create", Commands::Clean(_) => "clean", Commands::Config(_) => "config",