From cd62792c0aefffe8b0a5c7fc76e95dfa7b86a181 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 11 Apr 2022 16:11:16 +0200 Subject: Prevent duplicate named arguments and dictionary keys --- src/parse/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse/parser.rs') diff --git a/src/parse/parser.rs b/src/parse/parser.rs index 63ba4918..98adfba2 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -452,9 +452,9 @@ impl Marker { } /// Wrap all children that do not fulfill the predicate in error nodes. - pub fn filter_children(self, p: &mut Parser, f: F) + pub fn filter_children(self, p: &mut Parser, mut f: F) where - F: Fn(&Green) -> Result<(), &'static str>, + F: FnMut(&Green) -> Result<(), &'static str>, { for child in &mut p.children[self.0 ..] { // Don't expose errors. -- cgit v1.2.3