mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Remove unnecessary Names from FunctionData::params
This commit is contained in:
parent
3f5c9920d6
commit
a1b96b1e00
6 changed files with 13 additions and 12 deletions
|
@ -1844,7 +1844,7 @@ impl Param {
|
|||
}
|
||||
|
||||
pub fn name(&self, db: &dyn HirDatabase) -> Option<Name> {
|
||||
db.function_data(self.func.id).params[self.idx].0.clone()
|
||||
Some(self.as_local(db)?.name(db))
|
||||
}
|
||||
|
||||
pub fn as_local(&self, db: &dyn HirDatabase) -> Option<Local> {
|
||||
|
@ -1885,7 +1885,7 @@ impl SelfParam {
|
|||
func_data
|
||||
.params
|
||||
.first()
|
||||
.map(|(_, param)| match &**param {
|
||||
.map(|param| match &**param {
|
||||
TypeRef::Reference(.., mutability) => match mutability {
|
||||
hir_def::type_ref::Mutability::Shared => Access::Shared,
|
||||
hir_def::type_ref::Mutability::Mut => Access::Exclusive,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue