formatting

This commit is contained in:
Quinn Sinclair 2023-12-24 14:42:18 +02:00 committed by PartiallyTyped
parent 4b1ac31c18
commit 2177f2cb96
2 changed files with 2 additions and 9 deletions

View File

@ -57,10 +57,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, filter_arg: &hir
if is_iterator
&& parent_is_not_map
&& is_method(cx, filter_arg, sym!(is_some))
&& !span_contains_comment(
cx.sess().source_map(),
filter_span.with_hi(expr.span.hi())
)
&& !span_contains_comment(cx.sess().source_map(), filter_span.with_hi(expr.span.hi()))
{
span_lint_and_sugg(
cx,
@ -75,10 +72,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, filter_arg: &hir
if is_iterator
&& parent_is_not_map
&& is_method(cx, filter_arg, sym!(is_ok))
&& !span_contains_comment(
cx.sess().source_map(),
filter_span.with_hi(expr.span.hi())
)
&& !span_contains_comment(cx.sess().source_map(), filter_span.with_hi(expr.span.hi()))
{
span_lint_and_sugg(
cx,

View File

@ -4325,7 +4325,6 @@ fn check_methods<'tcx>(&self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
);
}
if self.msrv.meets(msrvs::ITER_FLATTEN) {
// use the sourcemap to get the span of the closure
iter_filter::check(cx, expr, arg, span);
}