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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unwrap_group(expr: &syn::Expr) -> &syn::Expr {
|
pub fn unwrap_group(mut expr: &syn::Expr) -> &syn::Expr {
|
||||||
match expr {
|
while let syn::Expr::Group(g) = expr {
|
||||||
syn::Expr::Group(syn::ExprGroup { expr, .. }) => &*expr,
|
expr = &*g.expr;
|
||||||
other => other,
|
|
||||||
}
|
}
|
||||||
|
expr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue