mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Drive by lints
This commit is contained in:
parent
5063274959
commit
1808175f98
4 changed files with 4 additions and 4 deletions
|
@ -749,7 +749,7 @@ impl Const {
|
|||
db.const_data(self)
|
||||
}
|
||||
|
||||
pub fn name(&self, db: &impl HirDatabase) -> Option<Name> {
|
||||
pub fn name(self, db: &impl HirDatabase) -> Option<Name> {
|
||||
self.data(db).name().cloned()
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ impl FromSource for StructField {
|
|||
.fields()
|
||||
.into_iter()
|
||||
.flat_map(|it| it.iter())
|
||||
.map(|(id, _)| StructField { parent: variant_def.clone(), id })
|
||||
.map(|(id, _)| StructField { parent: variant_def, id })
|
||||
.find(|f| f.source(db) == src)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue