aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src')
-rw-r--r--crates/assists/src/handlers/extract_struct_from_enum_variant.rs2
-rw-r--r--crates/assists/src/handlers/qualify_path.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
index d85767b4e..2e56bd7ff 100644
--- a/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
+++ b/crates/assists/src/handlers/extract_struct_from_enum_variant.rs
@@ -212,7 +212,7 @@ fn update_reference(
212 find_node_at_offset::<ast::PathExpr>(source_file.syntax(), offset) 212 find_node_at_offset::<ast::PathExpr>(source_file.syntax(), offset)
213 { 213 {
214 // tuple variant 214 // tuple variant
215 (path_expr.path()?.segment()?, path_expr.syntax().parent()?.clone()) 215 (path_expr.path()?.segment()?, path_expr.syntax().parent()?)
216 } else if let Some(record_expr) = 216 } else if let Some(record_expr) =
217 find_node_at_offset::<ast::RecordExpr>(source_file.syntax(), offset) 217 find_node_at_offset::<ast::RecordExpr>(source_file.syntax(), offset)
218 { 218 {
diff --git a/crates/assists/src/handlers/qualify_path.rs b/crates/assists/src/handlers/qualify_path.rs
index 6f9810fe8..98cb09214 100644
--- a/crates/assists/src/handlers/qualify_path.rs
+++ b/crates/assists/src/handlers/qualify_path.rs
@@ -150,7 +150,7 @@ impl QualifyCandidate<'_> {
150 import, 150 import,
151 trait_method_name, 151 trait_method_name,
152 generics, 152 generics,
153 match arg_list.clone() { 153 match arg_list {
154 Some(args) => make::arg_list(iter::once(receiver).chain(args)), 154 Some(args) => make::arg_list(iter::once(receiver).chain(args)),
155 None => make::arg_list(iter::once(receiver)), 155 None => make::arg_list(iter::once(receiver)),
156 } 156 }