Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
tu6ge committed Sep 20, 2023
1 parent d0bdbdb commit b38e12e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/register/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b38e12e

Please sign in to comment.