fix clippy::redundant_clone

This commit is contained in:
Matthias Krüger 2022-03-12 14:35:25 +01:00
parent d64d711db2
commit 21ffc5350d
5 changed files with 6 additions and 10 deletions

View file

@ -306,7 +306,7 @@ impl NameClass {
if let Some(it) = ast::LifetimeParam::cast(parent.clone()) {
sema.to_def(&it).map(Into::into).map(Definition::GenericParam)
} else if let Some(it) = ast::Label::cast(parent.clone()) {
} else if let Some(it) = ast::Label::cast(parent) {
sema.to_def(&it).map(Definition::Label)
} else {
None