Remove unnecessary Clone bounds

This commit is contained in:
Joscha 2022-11-19 19:36:10 +01:00
parent 0099277644
commit b291619d10
9 changed files with 32 additions and 33 deletions

View file

@ -35,14 +35,14 @@ impl Prefix {
}
}
fn prefix_neg() -> impl Parser<char, Prefix, Error = Error> + Clone {
fn prefix_neg() -> impl Parser<char, Prefix, Error = Error> {
just('-')
.map_with_span(|_, span| span)
.then(space())
.map(|(minus, s0)| Prefix::Neg { minus, s0 })
}
fn prefix_not() -> impl Parser<char, Prefix, Error = Error> + Clone {
fn prefix_not() -> impl Parser<char, Prefix, Error = Error> {
text::keyword("not")
.map_with_span(|_, span| span)
.then(space())
@ -50,7 +50,7 @@ fn prefix_not() -> impl Parser<char, Prefix, Error = Error> + Clone {
}
pub fn prefixed(
suffixed: impl Parser<char, Expr, Error = Error> + Clone + 'static,
suffixed: impl Parser<char, Expr, Error = Error> + 'static,
) -> BoxedParser<'static, char, Expr, Error> {
let prefix = prefix_neg()
.or(prefix_not())