File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,9 @@ impl<'de, S: BuildHasher + Default> Visitor<'de> for MapVisitor<S> {
47
47
fn visit_str < E : serde:: de:: Error > ( self , value : & str ) -> Result < Self :: Value , E > {
48
48
Ok ( value
49
49
. split ( [ '\n' , ',' ] )
50
- . map ( |s| {
51
- match s. split_once ( '=' ) {
52
- Some ( ( key, value) ) => ( key. to_owned ( ) , Some ( value. to_owned ( ) ) ) ,
53
- None => ( s. to_owned ( ) , None ) ,
54
- }
50
+ . map ( |s| match s. split_once ( '=' ) {
51
+ Some ( ( key, value) ) => ( key. to_owned ( ) , Some ( value. to_owned ( ) ) ) ,
52
+ None => ( s. to_owned ( ) , None ) ,
55
53
} )
56
54
. collect ( ) )
57
55
}
Original file line number Diff line number Diff line change @@ -77,11 +77,7 @@ impl<'a> RustAnalyzer<'a> {
77
77
let editioned_file_id = semantics
78
78
. attach_first_edition ( file_id)
79
79
. ok_or ( "failed to determine rust edition" ) ?;
80
- Ok ( (
81
- semantics,
82
- editioned_file_id,
83
- input,
84
- ) )
80
+ Ok ( ( semantics, editioned_file_id, input) )
85
81
}
86
82
}
87
83
}
Original file line number Diff line number Diff line change @@ -284,16 +284,14 @@ impl<'a> Translator<'a> {
284
284
if let Some ( value) = semantics
285
285
. hir_file_for ( expanded)
286
286
. macro_file ( )
287
- . and_then ( |macro_call_id| {
288
- semantics
289
- . db
290
- . parse_macro_expansion_error ( macro_call_id)
291
- } )
287
+ . and_then ( |macro_call_id| semantics. db . parse_macro_expansion_error ( macro_call_id) )
292
288
{
293
289
if let Some ( err) = & value. err {
294
290
let error = err. render_to_string ( semantics. db ) ;
295
291
let hir_file_id = semantics. hir_file_for ( node. syntax ( ) ) ;
296
- if Some ( err. span ( ) . anchor . file_id . file_id ( ) ) == hir_file_id. file_id ( ) . map ( |f| f. file_id ( semantics. db ) ) {
292
+ if Some ( err. span ( ) . anchor . file_id . file_id ( ) )
293
+ == hir_file_id. file_id ( ) . map ( |f| f. file_id ( semantics. db ) )
294
+ {
297
295
let location = err. span ( ) . range
298
296
+ semantics
299
297
. db
You can’t perform that action at this time.
0 commit comments