while let unwrap_group
This commit is contained in:
parent
08802e2024
commit
67948a24f7
|
@ -118,9 +118,9 @@ pub fn ensure_not_async_fn(sig: &syn::Signature) -> syn::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn unwrap_group(expr: &syn::Expr) -> &syn::Expr {
|
||||
match expr {
|
||||
syn::Expr::Group(syn::ExprGroup { expr, .. }) => &*expr,
|
||||
other => other,
|
||||
pub fn unwrap_group(mut expr: &syn::Expr) -> &syn::Expr {
|
||||
while let syn::Expr::Group(g) = expr {
|
||||
expr = &*g.expr;
|
||||
}
|
||||
expr
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue