From 2fdd4a16047729c5711fbbe2bb1b466be3fba04a Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Thu, 8 Jun 2023 15:40:30 +0300 Subject: [PATCH] Fix some names an docs. --- src/tree/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tree/mod.rs b/src/tree/mod.rs index 288f62f..e835fd3 100644 --- a/src/tree/mod.rs +++ b/src/tree/mod.rs @@ -78,6 +78,7 @@ impl Node { /// Returns an iterator over all identifiers in this expression, allowing mutation. /// Each occurrence of an identifier is returned separately. + /// /// # Examples /// /// ```rust @@ -295,7 +296,7 @@ impl Node { /// /// let mut tree = build_operator_tree("d = a + f(b + c)").unwrap(); // Do proper error handling here /// - /// for identifier in tree.iter_function_variable_identifiers_mut() { + /// for identifier in tree.iter_function_identifiers_mut() { /// *identifier = String::from("x"); /// } /// @@ -308,7 +309,7 @@ impl Node { /// assert_eq!(iter.next(), Some("c")); /// assert_eq!(iter.next(), None); /// ``` - pub fn iter_function_variable_identifiers_mut(&mut self) -> impl Iterator { + pub fn iter_function_identifiers_mut(&mut self) -> impl Iterator { self.iter_operators_mut() .filter_map(|operator| match operator { Operator::FunctionIdentifier { identifier } => Some(identifier),