chore: typos
This commit is contained in:
1 parent
91fa5fa172
commit
bb9b95fbd1
2 files changed
+3
-3
No files matched your search
@@ -16,7 +16,7 @@ pub struct Create {
|
|||||||
|
|
||||||
impl Create {
|
impl Create {
|
||||||
pub fn create(self) -> Result<()> {
|
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.");
|
return custom_error!("❗Unsupported project name.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ impl Create {
|
|||||||
Ok(())
|
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();
|
let r = Regex::new(r"^[a-zA-Z][a-zA-Z0-9\-_]$").unwrap();
|
||||||
r.is_match(&name)
|
r.is_match(&name)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ impl Commands {
|
|||||||
match self {
|
match self {
|
||||||
Commands::Build(_) => "build",
|
Commands::Build(_) => "build",
|
||||||
Commands::Translate(_) => "translate",
|
Commands::Translate(_) => "translate",
|
||||||
Commands::Serve(_) => "sevre",
|
Commands::Serve(_) => "serve",
|
||||||
Commands::Create(_) => "create",
|
Commands::Create(_) => "create",
|
||||||
Commands::Clean(_) => "clean",
|
Commands::Clean(_) => "clean",
|
||||||
Commands::Config(_) => "config",
|
Commands::Config(_) => "config",
|
||||||
|
|||||||
Reference in new issue
Block a user