diff --git a/src/register/mod.rs b/src/register/mod.rs index 96ed022..beb1d76 100644 --- a/src/register/mod.rs +++ b/src/register/mod.rs @@ -320,7 +320,7 @@ where for (mut names, rules) in rules.into_iter() { value_map.index(names); let rule_resp = rules.call(value_map); - names = value_map.remove_index(); + names = value_map.take_index(); let field_msg = rule_resp .into_iter() diff --git a/src/value/mod.rs b/src/value/mod.rs index 8d95903..dba3375 100644 --- a/src/value/mod.rs +++ b/src/value/mod.rs @@ -122,7 +122,8 @@ impl ValueMap { self.index = index; } - pub fn remove_index(&mut self) -> FieldNames { + /// Takes the FieldNames out of the ValueMap + pub fn take_index(&mut self) -> FieldNames { let mut x = FieldNames::default(); mem::swap(&mut self.index, &mut x); x