["next", "skip_while"] => skip_while_next::check(cx, expr, arg_lists[1]),
["next", "iter"] => iter_next_slice::check(cx, expr, arg_lists[1]),
["map", "filter"] => filter_map::check(cx, expr, false),
- ["map", "filter_map"] => filter_map_map::check(cx, expr, arg_lists[1], arg_lists[0]),
+ ["map", "filter_map"] => filter_map_map::check(cx, expr),
["next", "filter_map"] => filter_map_next::check(cx, expr, arg_lists[1], self.msrv.as_ref()),
["map", "find"] => filter_map::check(cx, expr, true),
- ["flat_map", "filter"] => filter_flat_map::check(cx, expr, arg_lists[1], arg_lists[0]),
- ["flat_map", "filter_map"] => filter_map_flat_map::check(cx, expr, arg_lists[1], arg_lists[0]),
+ ["flat_map", "filter"] => filter_flat_map::check(cx, expr),
+ ["flat_map", "filter_map"] => filter_map_flat_map::check(cx, expr),
["flat_map", ..] => flat_map_identity::check(cx, expr, arg_lists[0], method_spans[0]),
["flatten", "map"] => map_flatten::check(cx, expr, arg_lists[1]),
- ["is_some", "find"] => search_is_some::check(cx, expr, "find", arg_lists[1], arg_lists[0], method_spans[1]),
- ["is_some", "position"] => {
- search_is_some::check(cx, expr, "position", arg_lists[1], arg_lists[0], method_spans[1])
+ [option_check_method, "find"] if "is_some" == *option_check_method || "is_none" == *option_check_method => {
+ search_is_some::check(
+ cx,
+ expr,
+ "find",
+ option_check_method,
+ arg_lists[1],
+ arg_lists[0],
+ method_spans[1],
+ )
},
- ["is_some", "rposition"] => {
- search_is_some::check(cx, expr, "rposition", arg_lists[1], arg_lists[0], method_spans[1])
+ [option_check_method, "position"]
+ if "is_some" == *option_check_method || "is_none" == *option_check_method =>
+ {
+ search_is_some::check(
+ cx,
+ expr,
+ "position",
+ option_check_method,
+ arg_lists[1],
+ arg_lists[0],
+ method_spans[1],
+ )
+ },
+ [option_check_method, "rposition"]
+ if "is_some" == *option_check_method || "is_none" == *option_check_method =>
+ {
+ search_is_some::check(
+ cx,
+ expr,
+ "rposition",
+ option_check_method,
+ arg_lists[1],
+ arg_lists[0],
+ method_spans[1],
+ )
},
["extend", ..] => string_extend_chars::check(cx, expr, arg_lists[0]),
["count", "into_iter"] => iter_count::check(cx, expr, &arg_lists[1], "into_iter"),