Skip to content

Commit 6130860

Browse files
committed
use fn_name instead of name_ref.text()
1 parent d39677c commit 6130860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/generate_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn gen_fn(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> {
7373
Some(hir::PathResolution::Def(hir::ModuleDef::Adt(adt))) => {
7474
if let hir::Adt::Enum(_) = adt {
7575
// Don't suggest generating function if the name starts with an uppercase letter
76-
if name_ref.text().starts_with(char::is_uppercase) {
76+
if fn_name.starts_with(char::is_uppercase) {
7777
return None;
7878
}
7979
}

0 commit comments

Comments
 (0)