From 45660a2c81d8f3f7ad36ae5a7069b914e9003cc5 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Fri, 8 Nov 2024 03:26:32 +0800 Subject: [PATCH] refactor: use simplified expression (#865) Signed-off-by: wangjingcun --- ff-macros/src/unroll.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ff-macros/src/unroll.rs b/ff-macros/src/unroll.rs index cd4d2b7c3..590695f77 100644 --- a/ff-macros/src/unroll.rs +++ b/ff-macros/src/unroll.rs @@ -110,7 +110,7 @@ fn unroll(expr: &Expr, unroll_by: usize) -> Expr { }) = *pat.clone() { // Don't know how to deal with these so skip and return the original. - if !by_ref.is_none() || !mutability.is_none() || !subpat.is_none() { + if by_ref.is_some() || mutability.is_some() || subpat.is_some() { return forloop_with_body(new_body); } let idx = ident; // got the index variable name