From f6ba0517bd5d9165a43b86016f392265e80253f9 Mon Sep 17 00:00:00 2001 From: Daniel Duque Date: Tue, 20 Aug 2024 22:19:47 -0700 Subject: [PATCH] fix(docs): Escape pipes in `Repeat::fold` usage --- src/combinator/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/combinator/mod.rs b/src/combinator/mod.rs index ce7f54ae..e8f4c4bb 100644 --- a/src/combinator/mod.rs +++ b/src/combinator/mod.rs @@ -42,7 +42,7 @@ //! | [`repeat`] | `repeat(1..=3, "ab")` | `"ababc"` | `"c"` | `Ok(vec!["ab", "ab"])` |Applies the parser between m and n times (n included) and returns the list of results in a Vec| //! | [`repeat_till`] | `repeat_till(0.., "ab", "ef")` | `"ababefg"` | `"g"` | `Ok((vec!["ab", "ab"], "ef"))` |Applies the first parser until the second applies. Returns a tuple containing the list of results from the first in a Vec and the result of the second| //! | [`separated`] | `separated(1..=3, "ab", ",")` | `"ab,ab,ab."` | `"."` | `Ok(vec!["ab", "ab", "ab"])` |Applies the parser and separator between m and n times (n included) and returns the list of results in a Vec| -//! | [`Repeat::fold`] | `repeat(1..=2, be_u8).fold(|| 0, |acc, item| acc + item)` | `[1, 2, 3]` | `[3]` | `Ok(3)` |Applies the parser between m and n times (n included) and folds the list of return value| +//! | [`Repeat::fold`] | repeat(1..=2, be_u8).fold(\|\| 0, \|acc, item\| acc + item) | `[1, 2, 3]` | `[3]` | `Ok(3)` |Applies the parser between m and n times (n included) and folds the list of return value| //! //! ## Partial related //!