File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ declare_clippy_lint! {
26
26
#[ clippy:: version = "1.64.0" ]
27
27
pub ASSERTIONS_ON_RESULT_STATES ,
28
28
style,
29
- "`assert!(r.is_ok())` gives worse error message than directly calling `r.unwrap()`"
29
+ "`assert!(r.is_ok())`/`assert!(r.is_err())` gives worse error message than directly calling `r.unwrap()`/`r.unwrap_err ()`"
30
30
}
31
31
32
32
declare_lint_pass ! ( AssertionsOnResultStates => [ ASSERTIONS_ON_RESULT_STATES ] ) ;
@@ -54,7 +54,7 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnResultStates {
54
54
"{}.unwrap()" ,
55
55
method_receiver_snippet
56
56
) ,
57
- Applicability :: MachineApplicable ,
57
+ Applicability :: MaybeIncorrect ,
58
58
) ;
59
59
} else if method_segment. ident . name == sym ! ( is_err)
60
60
&& let Some ( value_type) = get_result_child_type ( cx, result_type, false /*err*/ )
@@ -70,7 +70,7 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnResultStates {
70
70
"{}.unwrap_err()" ,
71
71
method_receiver_snippet
72
72
) ,
73
- Applicability :: MachineApplicable ,
73
+ Applicability :: MaybeIncorrect ,
74
74
) ;
75
75
}
76
76
}
You can’t perform that action at this time.
0 commit comments