Assert that first letter is capitalized
This commit is contained in:
parent
e04661e495
commit
9042bb7892
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,12 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
|
|||
f: impl FnOnce(&mut AssistBuilder),
|
||||
) -> Option<Assist> {
|
||||
let label = AssistLabel { label: label.into(), id };
|
||||
assert_eq!(
|
||||
label.label.chars().nth(0).and_then(|c| Some(c.is_uppercase())),
|
||||
Some(true),
|
||||
"First character should be uppercase"
|
||||
);
|
||||
|
||||
let assist = if self.should_compute_edit {
|
||||
let action = {
|
||||
let mut edit = AssistBuilder::default();
|
||||
|
|
Loading…
Add table
Reference in a new issue