diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2024-01-04 10:29:47 +0000 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2024-01-05 10:56:59 +0000 |
| commit | f73e37d00ce29fbf81f62103ce06d2d3787c3842 (patch) | |
| tree | c56fa0a8ccf511609623177756933342623237f8 /clippy_lints/src/utils | |
| parent | 04ebf3c8c9aef6c021a60d73f0f1a798a81b7171 (diff) | |
Update clippy for hir::Guard removal
Diffstat (limited to 'clippy_lints/src/utils')
| -rw-r--r-- | clippy_lints/src/utils/author.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs index 8817e46b3c8..8d38b87e1d7 100644 --- a/clippy_lints/src/utils/author.rs +++ b/clippy_lints/src/utils/author.rs @@ -318,17 +318,11 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> { self.pat(field!(arm.pat)); match arm.value.guard { None => chain!(self, "{arm}.guard.is_none()"), - Some(hir::Guard::If(expr)) => { + Some(expr) => { bind!(self, expr); - chain!(self, "let Some(Guard::If({expr})) = {arm}.guard"); + chain!(self, "let Some({expr}) = {arm}.guard"); self.expr(expr); }, - Some(hir::Guard::IfLet(let_expr)) => { - bind!(self, let_expr); - chain!(self, "let Some(Guard::IfLet({let_expr}) = {arm}.guard"); - self.pat(field!(let_expr.pat)); - self.expr(field!(let_expr.init)); - }, } self.expr(field!(arm.body)); } |
