Rearrange some code.
This commit is contained in:
parent
5e9a3be5d4
commit
dfaf1c7da1
@ -89,19 +89,6 @@ impl From<Vec<Expr>> for Api {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Exprs {
|
|
||||||
pub inner: Vec<Expr>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Synom for Exprs {
|
|
||||||
named!(parse -> Self, do_parse!(
|
|
||||||
exprs: many0!(syn!(Expr)) >>
|
|
||||||
(Exprs {
|
|
||||||
inner: exprs,
|
|
||||||
})
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToTokens for Api {
|
impl ToTokens for Api {
|
||||||
fn to_tokens(&self, tokens: &mut Tokens) {
|
fn to_tokens(&self, tokens: &mut Tokens) {
|
||||||
let description = &self.metadata.description;
|
let description = &self.metadata.description;
|
||||||
@ -364,3 +351,16 @@ impl ToTokens for Api {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct Exprs {
|
||||||
|
pub inner: Vec<Expr>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Synom for Exprs {
|
||||||
|
named!(parse -> Self, do_parse!(
|
||||||
|
exprs: many0!(syn!(Expr)) >>
|
||||||
|
(Exprs {
|
||||||
|
inner: exprs,
|
||||||
|
})
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user