Skip to content

Commit

Permalink
refactor: Make add file prompt better
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian3647 committed Oct 29, 2023
1 parent aaa12ba commit 9639780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/commit_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub enum CommitType {
Refactor,
Perf,
Test,
Chore
Chore,
}

// Return a description of the commit type
Expand All @@ -20,11 +20,11 @@ impl Display for CommitType {
CommitType::Feat => "A new feature",
CommitType::Fix => "A bug fix",
CommitType::Docs => "Documentation updates",
CommitType::Style => "Changes dat do not affect the meaning of the code",
CommitType::Style => "Changes that do not affect the meaning of the code",
CommitType::Refactor => "A code change that neither fixes a bug or adds a feature",
CommitType::Perf => "A code change that improves performance",
CommitType::Test => "Adding or updating tests",
CommitType::Chore => "Changes to the build process or auxiliary tools"
CommitType::Chore => "Changes to the build process or auxiliary tools",
})
}
}
Expand All @@ -42,7 +42,7 @@ impl From<String> for CommitType {
"fix:" => Self::Fix,
"feat:" => Self::Feat,
// Unreachable.
_ => panic!("Unknown commit type {}", x)
_ => panic!("Unknown commit type {}", x),
}
}
}
2 changes: 1 addition & 1 deletion src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ pub fn get_commit_type() -> InquireResult<String> {
}

pub fn confirm(m: &str) -> InquireResult<bool> {
Confirm::new(m).prompt()
Confirm::new(m).with_default(true).prompt()
}

0 comments on commit 9639780

Please sign in to comment.