mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
needless_borrow
This commit is contained in:
parent
d351cb8dfb
commit
3839f9a9a2
9 changed files with 14 additions and 15 deletions
|
@ -1439,7 +1439,7 @@ impl Adt {
|
|||
resolver
|
||||
.generic_params()
|
||||
.and_then(|gp| {
|
||||
(&gp.lifetimes)
|
||||
gp.lifetimes
|
||||
.iter()
|
||||
// there should only be a single lifetime
|
||||
// but `Arena` requires to use an iterator
|
||||
|
@ -4286,7 +4286,7 @@ impl Type {
|
|||
) -> impl Iterator<Item = SmolStr> + 'a {
|
||||
// iterate the lifetime
|
||||
self.as_adt()
|
||||
.and_then(|a| a.lifetime(db).map(|lt| (<.name).to_smol_str()))
|
||||
.and_then(|a| a.lifetime(db).map(|lt| lt.name.to_smol_str()))
|
||||
.into_iter()
|
||||
// add the type and const parameters
|
||||
.chain(self.type_and_const_arguments(db))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue