formatting
This commit is contained in:
parent
4b1ac31c18
commit
2177f2cb96
@ -57,10 +57,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, filter_arg: &hir
|
|||||||
if is_iterator
|
if is_iterator
|
||||||
&& parent_is_not_map
|
&& parent_is_not_map
|
||||||
&& is_method(cx, filter_arg, sym!(is_some))
|
&& is_method(cx, filter_arg, sym!(is_some))
|
||||||
&& !span_contains_comment(
|
&& !span_contains_comment(cx.sess().source_map(), filter_span.with_hi(expr.span.hi()))
|
||||||
cx.sess().source_map(),
|
|
||||||
filter_span.with_hi(expr.span.hi())
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
span_lint_and_sugg(
|
span_lint_and_sugg(
|
||||||
cx,
|
cx,
|
||||||
@ -75,10 +72,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, filter_arg: &hir
|
|||||||
if is_iterator
|
if is_iterator
|
||||||
&& parent_is_not_map
|
&& parent_is_not_map
|
||||||
&& is_method(cx, filter_arg, sym!(is_ok))
|
&& is_method(cx, filter_arg, sym!(is_ok))
|
||||||
&& !span_contains_comment(
|
&& !span_contains_comment(cx.sess().source_map(), filter_span.with_hi(expr.span.hi()))
|
||||||
cx.sess().source_map(),
|
|
||||||
filter_span.with_hi(expr.span.hi())
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
span_lint_and_sugg(
|
span_lint_and_sugg(
|
||||||
cx,
|
cx,
|
||||||
|
@ -4325,7 +4325,6 @@ fn check_methods<'tcx>(&self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if self.msrv.meets(msrvs::ITER_FLATTEN) {
|
if self.msrv.meets(msrvs::ITER_FLATTEN) {
|
||||||
|
|
||||||
// use the sourcemap to get the span of the closure
|
// use the sourcemap to get the span of the closure
|
||||||
iter_filter::check(cx, expr, arg, span);
|
iter_filter::check(cx, expr, arg, span);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user