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(
161161 let path_segment = name_ref. syntax ( ) . parent ( ) . and_then ( ast:: PathSegment :: cast) ?;
162162 // A `PathSegment` always belongs to a `Path`, so there's at least one `Path` at this point.
163163 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 ( ) ? ;
165165
166- if full_path. segment ( ) . unwrap ( ) . name_ref ( ) ? != * name_ref {
166+ if full_path. segment ( ) ? . name_ref ( ) ? != * name_ref {
167167 // `name_ref` isn't the last segment of the path, so `full_path` doesn't point to the
168168 // struct we want to edit.
169169 return None ;
You can’t perform that action at this time.
0 commit comments