@@ -11,8 +11,8 @@ use crate::{
11
11
db:: HirDatabase ,
12
12
diagnostics:: {
13
13
match_check:: { is_useful, MatchCheckCtx , Matrix , PatStack , Usefulness } ,
14
- MismatchedArgCount , MissingFields , MissingMatchArms , MissingOkOrSomeInTailExpr , MissingPatFields ,
15
- RemoveThisSemicolon ,
14
+ MismatchedArgCount , MissingFields , MissingMatchArms , MissingOkOrSomeInTailExpr ,
15
+ MissingPatFields , RemoveThisSemicolon ,
16
16
} ,
17
17
utils:: variant_data,
18
18
ApplicationTy , InferenceResult , Ty , TypeCtor ,
@@ -324,19 +324,22 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
324
324
let ( params, required) = match & mismatch. expected {
325
325
Ty :: Apply ( ApplicationTy { ctor, parameters } ) if ctor == & core_result_ctor => {
326
326
( parameters, "Ok" . to_string ( ) )
327
- } ,
327
+ }
328
328
Ty :: Apply ( ApplicationTy { ctor, parameters } ) if ctor == & core_option_ctor => {
329
329
( parameters, "Some" . to_string ( ) )
330
- } ,
330
+ }
331
331
_ => return ,
332
332
} ;
333
333
334
334
if params. len ( ) > 0 && params[ 0 ] == mismatch. actual {
335
335
let ( _, source_map) = db. body_with_source_map ( self . owner . into ( ) ) ;
336
336
337
337
if let Ok ( source_ptr) = source_map. expr_syntax ( id) {
338
- self . sink
339
- . push ( MissingOkOrSomeInTailExpr { file : source_ptr. file_id , expr : source_ptr. value , required } ) ;
338
+ self . sink . push ( MissingOkOrSomeInTailExpr {
339
+ file : source_ptr. file_id ,
340
+ expr : source_ptr. value ,
341
+ required,
342
+ } ) ;
340
343
}
341
344
}
342
345
}
0 commit comments