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

@ -10,17 +10,17 @@ pub type Error = Simple<char, Span>;
// TODO https://github.com/rust-lang/rust/issues/63063
fn inline() -> impl Parser<char, (), Error = Error> + Clone {
fn inline() -> impl Parser<char, (), Error = Error> {
filter(|c: &char| c.is_whitespace() && *c != '\n')
.repeated()
.to(())
}
fn newline() -> impl Parser<char, (), Error = Error> + Clone {
fn newline() -> impl Parser<char, (), Error = Error> {
just('\n').to(())
}
fn line() -> impl Parser<char, Line, Error = Error> + Clone {
fn line() -> impl Parser<char, Line, Error = Error> {
let empty = newline().to(Line::Empty);
let comment = just('#')