File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
crates/ide-assists/src/handlers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,9 @@ fn process_struct_name_reference(
161
161
let path_segment = name_ref. syntax ( ) . parent ( ) . and_then ( ast:: PathSegment :: cast) ?;
162
162
// A `PathSegment` always belongs to a `Path`, so there's at least one `Path` at this point.
163
163
let full_path =
164
- path_segment. syntax ( ) . parent ( ) ?. ancestors ( ) . map_while ( ast:: Path :: cast) . last ( ) . unwrap ( ) ;
164
+ path_segment. syntax ( ) . parent ( ) ?. ancestors ( ) . map_while ( ast:: Path :: cast) . last ( ) ? ;
165
165
166
- if full_path. segment ( ) . unwrap ( ) . name_ref ( ) ? != * name_ref {
166
+ if full_path. segment ( ) ? . name_ref ( ) ? != * name_ref {
167
167
// `name_ref` isn't the last segment of the path, so `full_path` doesn't point to the
168
168
// struct we want to edit.
169
169
return None ;
You can’t perform that action at this time.
0 commit comments