Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c8fcda3

Browse files
committedOct 21, 2023
refactor: resolve warnings
1 parent c61260d commit c8fcda3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎clippy_lints/src/redundant_closure_call.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use if_chain::if_chain;
66
use rustc_errors::Applicability;
77
use rustc_hir as hir;
88
use rustc_hir::intravisit::{Visitor as HirVisitor, Visitor};
9-
use rustc_hir::{intravisit as hir_visit, AsyncCoroutineKind, CoroutineKind};
9+
use rustc_hir::{intravisit as hir_visit};
1010
use rustc_lint::{LateContext, LateLintPass};
1111
use rustc_middle::hir::nested_filter;
1212
use rustc_middle::lint::in_external_macro;
@@ -62,7 +62,7 @@ impl<'tcx> Visitor<'tcx> for ReturnVisitor {
6262
}
6363

6464
/// Checks if the body is owned by an async closure
65-
fn is_async_closure(cx: &LateContext<'_>, body: &hir::Body<'_>) -> bool {
65+
fn is_async_closure(body: &hir::Body<'_>) -> bool {
6666
// NB: `async || 42` is desugared into `|| |mut __context: #[lang = "ResumeTy"] | 42`; so
6767
// we need to check if there is inner closure and check GeneratorKind of the inner one.
6868
if let hir::ExprKind::Closure(closure) = body.value.kind

0 commit comments

Comments
 (0)
Please sign in to comment.