File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/tools/rust-analyzer/crates/hir/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -202,15 +202,15 @@ impl HasSource for TypeOrConstParam {
202202 type Ast = Either < ast:: TypeOrConstParam , ast:: TraitOrAlias > ;
203203 fn source ( self , db : & dyn HirDatabase ) -> Option < InFile < Self :: Ast > > {
204204 let child_source = self . id . parent . child_source ( db. upcast ( ) ) ;
205- Some ( child_source. map ( |it| it[ self . id . local_id ] . clone ( ) ) )
205+ child_source. map ( |it| it. get ( self . id . local_id ) . cloned ( ) ) . transpose ( )
206206 }
207207}
208208
209209impl HasSource for LifetimeParam {
210210 type Ast = ast:: LifetimeParam ;
211211 fn source ( self , db : & dyn HirDatabase ) -> Option < InFile < Self :: Ast > > {
212212 let child_source = self . id . parent . child_source ( db. upcast ( ) ) ;
213- Some ( child_source. map ( |it| it[ self . id . local_id ] . clone ( ) ) )
213+ child_source. map ( |it| it. get ( self . id . local_id ) . cloned ( ) ) . transpose ( )
214214 }
215215}
216216
You can’t perform that action at this time.
0 commit comments