Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs')
-rw-r--r--crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
index 9095b1825f..c56d0b3de5 100644
--- a/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
+++ b/crates/ide-assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -215,12 +215,12 @@ fn tag_generics_in_variant(ty: &ast::Type, generics: &mut [(ast::GenericParam, b
ast::GenericParam::LifetimeParam(lt)
if matches!(token.kind(), T![lifetime_ident]) =>
{
- if let Some(lt) = lt.lifetime() {
- if lt.text().as_str() == token.text() {
- *tag = true;
- tagged_one = true;
- break;
- }
+ if let Some(lt) = lt.lifetime()
+ && lt.text().as_str() == token.text()
+ {
+ *tag = true;
+ tagged_one = true;
+ break;
}
}
param if matches!(token.kind(), T![ident]) => {