From d0aa9404f3d99d9a9c032fca555b3c3b890e2b54 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Thu, 7 Nov 2024 17:25:06 +0800 Subject: [PATCH] refactor: use simplified expression 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