File tree 1 file changed +2
-2
lines changed
src/tools/rust-analyzer/crates/hir/src
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 {
202
202
type Ast = Either < ast:: TypeOrConstParam , ast:: TraitOrAlias > ;
203
203
fn source ( self , db : & dyn HirDatabase ) -> Option < InFile < Self :: Ast > > {
204
204
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 ( )
206
206
}
207
207
}
208
208
209
209
impl HasSource for LifetimeParam {
210
210
type Ast = ast:: LifetimeParam ;
211
211
fn source ( self , db : & dyn HirDatabase ) -> Option < InFile < Self :: Ast > > {
212
212
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 ( )
214
214
}
215
215
}
216
216
You can’t perform that action at this time.
0 commit comments