Clean up unneeded `call!` calls
diff --git a/src/attr.rs b/src/attr.rs
index 6152635..5cbdee9 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -344,7 +344,7 @@
pound: punct!(#) >>
bang: punct!(!) >>
path_and_tts: brackets!(tuple!(
- call!(::Path::parse_mod_style),
+ call!(Path::parse_mod_style),
syn!(TokenStream)
)) >>
({
@@ -384,7 +384,7 @@
do_parse!(
pound: punct!(#) >>
path_and_tts: brackets!(tuple!(
- call!(::Path::parse_mod_style),
+ call!(Path::parse_mod_style),
syn!(TokenStream)
)) >>
({
diff --git a/src/expr.rs b/src/expr.rs
index 225fc65..1296594 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1438,7 +1438,7 @@
#[cfg(feature = "full")]
impl Synom for ExprArray {
named!(parse -> Self, do_parse!(
- elems: brackets!(call!(Delimited::parse_terminated)) >>
+ elems: brackets!(Delimited::parse_terminated) >>
(ExprArray {
attrs: Vec::new(),
elems: elems.0,
@@ -1448,7 +1448,7 @@
}
named!(and_call -> (Delimited<Expr, Token![,]>, token::Paren),
- parens!(call!(Delimited::parse_terminated)));
+ parens!(Delimited::parse_terminated));
#[cfg(feature = "full")]
named!(and_method_call -> ExprMethodCall, do_parse!(
@@ -1460,7 +1460,7 @@
call!(Delimited::parse_terminated),
punct!(>)
)) >>
- args: parens!(call!(Delimited::parse_terminated)) >>
+ args: parens!(Delimited::parse_terminated) >>
({
ExprMethodCall {
attrs: Vec::new(),
@@ -1496,7 +1496,7 @@
#[cfg(feature = "full")]
impl Synom for ExprTuple {
named!(parse -> Self, do_parse!(
- elems: parens!(call!(Delimited::parse_terminated)) >>
+ elems: parens!(Delimited::parse_terminated) >>
(ExprTuple {
attrs: Vec::new(),
elems: elems.0,
@@ -1513,7 +1513,7 @@
pat: syn!(Pat) >>
eq: punct!(=) >>
cond: expr_no_struct >>
- then_block: braces!(call!(Block::parse_within)) >>
+ then_block: braces!(Block::parse_within) >>
else_block: option!(else_block) >>
(ExprIfLet {
attrs: Vec::new(),
@@ -1536,7 +1536,7 @@
named!(parse -> Self, do_parse!(
if_: keyword!(if) >>
cond: expr_no_struct >>
- then_block: braces!(call!(Block::parse_within)) >>
+ then_block: braces!(Block::parse_within) >>
else_block: option!(else_block) >>
(ExprIf {
attrs: Vec::new(),
@@ -1560,7 +1560,7 @@
syn!(ExprIfLet) => { Expr::IfLet }
|
do_parse!(
- else_block: braces!(call!(Block::parse_within)) >>
+ else_block: braces!(Block::parse_within) >>
(Expr::Block(ExprBlock {
attrs: Vec::new(),
block: Block {
@@ -1978,7 +1978,7 @@
#[cfg(feature = "full")]
impl Synom for Block {
named!(parse -> Self, do_parse!(
- stmts: braces!(call!(Block::parse_within)) >>
+ stmts: braces!(Block::parse_within) >>
(Block {
stmts: stmts.0,
brace_token: stmts.1,
@@ -2295,7 +2295,7 @@
Some((_, Some(_))) => true,
_ => false,
},
- call!(Delimited::parse_terminated)) >>
+ Delimited::parse_terminated) >>
(front, dotdot, back)
)) >>
({
@@ -2391,7 +2391,7 @@
Some((_, ref trailing)) => trailing.is_some(),
_ => false,
},
- call!(Delimited::parse_terminated)
+ Delimited::parse_terminated
) >>
(before, middle, after)
)),
diff --git a/src/generics.rs b/src/generics.rs
index 970428b..70b3da4 100644
--- a/src/generics.rs
+++ b/src/generics.rs
@@ -205,7 +205,7 @@
lifetimes: call!(Delimited::<LifetimeDef, Token![,]>::parse_terminated) >>
ty_params: cond!(
lifetimes.empty_or_trailing(),
- call!(Delimited::<TypeParam, Token![,]>::parse_terminated)
+ Delimited::<TypeParam, Token![,]>::parse_terminated
) >>
gt: punct!(>) >>
(lifetimes, ty_params, Some(lt), Some(gt))
@@ -237,7 +237,7 @@
colon: option!(punct!(:)) >>
bounds: cond!(
colon.is_some(),
- call!(Delimited::parse_separated_nonempty)
+ Delimited::parse_separated_nonempty
) >>
(LifetimeDef {
attrs: attrs,
@@ -270,7 +270,7 @@
colon: option!(punct!(:)) >>
bounds: cond!(
colon.is_some(),
- call!(Delimited::parse_separated_nonempty)
+ Delimited::parse_separated_nonempty
) >>
default: option!(do_parse!(
eq: punct!(=) >>
@@ -360,7 +360,7 @@
colon: option!(punct!(:)) >>
bounds: cond!(
colon.is_some(),
- call!(Delimited::parse_separated)
+ Delimited::parse_separated
) >>
(WherePredicate::RegionPredicate(WhereRegionPredicate {
lifetime: ident,
diff --git a/src/item.rs b/src/item.rs
index c9b7c9b..59694bb 100644
--- a/src/item.rs
+++ b/src/item.rs
@@ -1041,9 +1041,7 @@
ident: syn!(Ident) >>
generics: syn!(Generics) >>
colon: option!(punct!(:)) >>
- bounds: cond!(colon.is_some(),
- call!(Delimited::parse_separated_nonempty)
- ) >>
+ bounds: cond!(colon.is_some(), Delimited::parse_separated_nonempty) >>
where_clause: option!(syn!(WhereClause)) >>
body: braces!(many0!(TraitItem::parse)) >>
(ItemTrait {
@@ -1124,7 +1122,7 @@
fn_: keyword!(fn) >>
ident: syn!(Ident) >>
generics: syn!(Generics) >>
- inputs: parens!(call!(Delimited::parse_terminated)) >>
+ inputs: parens!(Delimited::parse_terminated) >>
ret: syn!(ReturnType) >>
where_clause: option!(syn!(WhereClause)) >>
body: option!(braces!(
@@ -1177,9 +1175,7 @@
ident: syn!(Ident) >>
generics: syn!(Generics) >>
colon: option!(punct!(:)) >>
- bounds: cond!(colon.is_some(),
- call!(Delimited::parse_separated_nonempty)
- ) >>
+ bounds: cond!(colon.is_some(), Delimited::parse_separated_nonempty) >>
where_clause: option!(syn!(WhereClause)) >>
default: option!(tuple!(punct!(=), syn!(Type))) >>
semi: punct!(;) >>
@@ -1289,7 +1285,7 @@
fn_: keyword!(fn) >>
ident: syn!(Ident) >>
generics: syn!(Generics) >>
- inputs: parens!(call!(Delimited::parse_terminated)) >>
+ inputs: parens!(Delimited::parse_terminated) >>
ret: syn!(ReturnType) >>
where_clause: option!(syn!(WhereClause)) >>
inner_attrs_stmts: braces!(tuple!(
diff --git a/src/ty.rs b/src/ty.rs
index 88575a8..ad75b36 100644
--- a/src/ty.rs
+++ b/src/ty.rs
@@ -500,7 +500,7 @@
impl Synom for TypeTuple {
named!(parse -> Self, do_parse!(
- data: parens!(call!(Delimited::parse_terminated)) >>
+ data: parens!(Delimited::parse_terminated) >>
(TypeTuple {
elems: data.0,
paren_token: data.1,
@@ -579,7 +579,7 @@
impl Synom for ParenthesizedGenericArguments {
named!(parse -> Self, do_parse!(
- data: parens!(call!(Delimited::parse_terminated)) >>
+ data: parens!(Delimited::parse_terminated) >>
output: syn!(ReturnType) >>
(ParenthesizedGenericArguments {
paren_token: data.1,
@@ -612,7 +612,7 @@
named!(parse(allow_plus: bool) -> Self, do_parse!(
dyn_token: option!(keyword!(dyn)) >>
bounds: alt!(
- cond_reduce!(allow_plus, call!(Delimited::parse_terminated_nonempty))
+ cond_reduce!(allow_plus, Delimited::parse_terminated_nonempty)
|
syn!(TypeParamBound) => { |x| vec![x].into() }
) >>