diff options
author | Nadrieril | 2020-11-02 22:51:23 +0000 |
---|---|---|
committer | GitHub | 2020-11-02 22:51:23 +0000 |
commit | 527b05b66d84c6acaef904f7143a87a1eff67858 (patch) | |
tree | 30c37039b161e7ce913e5fb41ff4a30bc6d7e622 /abnf_to_pest/src | |
parent | 6375a0f2c3b123af5b1ff8c79d02caef6d2ed7e1 (diff) | |
parent | 2839bfe23b7a0916e9e625a4d62835c39d8693ba (diff) |
Merge branch 'master' into with-no-desugar
Diffstat (limited to 'abnf_to_pest/src')
-rw-r--r-- | abnf_to_pest/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/abnf_to_pest/src/lib.rs b/abnf_to_pest/src/lib.rs index deddf54..627444a 100644 --- a/abnf_to_pest/src/lib.rs +++ b/abnf_to_pest/src/lib.rs @@ -42,9 +42,12 @@ impl Pretty for Node { nodes.iter().map(|x| x.pretty()), BoxDoc::space().append(BoxDoc::text("~ ")), ), - Repetition(rep) => { - rep.node().pretty().append(rep.repeat().pretty()) - } + Repetition(rep) => rep + .node() + .pretty() + // this repeat application is a temporary work-around for the clippy issue: + // https://github.com/rust-lang/rust-clippy/pull/5948 + .append(abnf::types::Repetition::repeat(rep).pretty()), Rulename(s) => BoxDoc::text(escape_rulename(s)), Group(n) => BoxDoc::text("(") .append(n.pretty().nest(4).group()) |