needless_borrow

This commit is contained in:
Johann Hemmann 2024-01-19 15:25:51 +01:00
parent d351cb8dfb
commit 3839f9a9a2
9 changed files with 14 additions and 15 deletions

View file

@ -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| (&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))