@@ -5728,9 +5728,9 @@ impl Methods {
57285728 no_effect_replace:: check ( cx, expr, arg1, arg2) ;
57295729
57305730 // Check for repeated `str::replace` calls to perform `collapsible_str_replace` lint
5731- if self . msrv . meets ( cx, msrvs:: PATTERN_TRAIT_CHAR_ARRAY )
5732- && name == sym:: replace
5731+ if name == sym:: replace
57335732 && let Some ( ( sym:: replace, ..) ) = method_call ( recv)
5733+ && self . msrv . meets ( cx, msrvs:: PATTERN_TRAIT_CHAR_ARRAY )
57345734 {
57355735 collapsible_str_replace:: check ( cx, expr, arg1, arg2) ;
57365736 }
@@ -5801,10 +5801,9 @@ impl Methods {
58015801 } ,
58025802 ( sym:: take, [ ] ) => needless_option_take:: check ( cx, expr, recv) ,
58035803 ( sym:: then, [ arg] ) => {
5804- if ! self . msrv . meets ( cx, msrvs:: BOOL_THEN_SOME ) {
5805- return ;
5804+ if self . msrv . meets ( cx, msrvs:: BOOL_THEN_SOME ) {
5805+ unnecessary_lazy_eval :: check ( cx , expr , recv , arg , "then_some" , true ) ;
58065806 }
5807- unnecessary_lazy_eval:: check ( cx, expr, recv, arg, "then_some" , true ) ;
58085807 } ,
58095808 ( sym:: try_into, [ ] ) if cx. ty_based_def ( expr) . opt_parent ( cx) . is_diag_item ( cx, sym:: TryInto ) => {
58105809 unnecessary_fallible_conversions:: check_method ( cx, expr) ;
0 commit comments