File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -262,12 +262,11 @@ impl Module {
262
262
263
263
let original_file = src. file_id . original_file ( db) ;
264
264
265
- let ( krate, local_id) =
266
- db. relevant_crates ( original_file) . iter ( ) . find_map ( |& crate_id| {
267
- let crate_def_map = db. crate_def_map ( crate_id) ;
268
- let local_id = crate_def_map. modules_for_file ( original_file) . next ( ) ?;
269
- Some ( ( crate_id, local_id) )
270
- } ) ?;
265
+ let ( krate, local_id) = db. relevant_crates ( original_file) . iter ( ) . find_map ( |& crate_id| {
266
+ let crate_def_map = db. crate_def_map ( crate_id) ;
267
+ let local_id = crate_def_map. modules_for_file ( original_file) . next ( ) ?;
268
+ Some ( ( crate_id, local_id) )
269
+ } ) ?;
271
270
Some ( Module { id : ModuleId { krate, local_id } } )
272
271
}
273
272
}
Original file line number Diff line number Diff line change @@ -682,8 +682,7 @@ where
682
682
}
683
683
684
684
fn define_def ( & mut self , def : & raw:: DefData ) {
685
- let module =
686
- ModuleId { krate : self . def_collector . def_map . krate , local_id : self . module_id } ;
685
+ let module = ModuleId { krate : self . def_collector . def_map . krate , local_id : self . module_id } ;
687
686
let ctx = LocationCtx :: new ( self . def_collector . db , module, self . file_id ) ;
688
687
689
688
let name = def. name . clone ( ) ;
Original file line number Diff line number Diff line change @@ -332,8 +332,7 @@ fn bar() {
332
332
"#
333
333
. trim ( ) ,
334
334
) ;
335
- let dst_file =
336
- project_dir ( ) . join ( "crates/ra_ide/src/snapshots/rainbow_highlighting.html" ) ;
335
+ let dst_file = project_dir ( ) . join ( "crates/ra_ide/src/snapshots/rainbow_highlighting.html" ) ;
337
336
let actual_html = & analysis. highlight_as_html ( file_id, true ) . unwrap ( ) ;
338
337
let expected_html = & read_text ( & dst_file) ;
339
338
std:: fs:: write ( dst_file, & actual_html) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments