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> {
4747 fn visit_str < E : serde:: de:: Error > ( self , value : & str ) -> Result < Self :: Value , E > {
4848 Ok ( value
4949 . 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 ) ,
5553 } )
5654 . collect ( ) )
5755 }
Original file line number Diff line number Diff line change @@ -77,11 +77,7 @@ impl<'a> RustAnalyzer<'a> {
7777 let editioned_file_id = semantics
7878 . attach_first_edition ( file_id)
7979 . 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) )
8581 }
8682 }
8783 }
Original file line number Diff line number Diff line change @@ -284,16 +284,14 @@ impl<'a> Translator<'a> {
284284 if let Some ( value) = semantics
285285 . hir_file_for ( expanded)
286286 . 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) )
292288 {
293289 if let Some ( err) = & value. err {
294290 let error = err. render_to_string ( semantics. db ) ;
295291 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+ {
297295 let location = err. span ( ) . range
298296 + semantics
299297 . db
You can’t perform that action at this time.
0 commit comments