mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
use fn_name instead of name_ref.text()
This commit is contained in:
parent
d39677c1eb
commit
6130860789
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ fn gen_fn(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> {
|
|||
Some(hir::PathResolution::Def(hir::ModuleDef::Adt(adt))) => {
|
||||
if let hir::Adt::Enum(_) = adt {
|
||||
// Don't suggest generating function if the name starts with an uppercase letter
|
||||
if name_ref.text().starts_with(char::is_uppercase) {
|
||||
if fn_name.starts_with(char::is_uppercase) {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue