From c43ad9bfb9467627df1b40266ac7b0d570a55a62 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 21 Jul 2022 15:44:49 +0200 Subject: Refactor to move `index` field to `point` --- src/construct/partial_data.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/construct/partial_data.rs') diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index ea71bcf..ceeb89b 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -99,11 +99,7 @@ pub fn resolve_data(tokenizer: &mut Tokenizer, map: &mut EditMap) -> bool { // Change positional info. let exit_far = &tokenizer.events[exit_far_index]; - let point_end = exit_far.point.clone(); - let index_end = exit_far.index; - let exit = &mut tokenizer.events[exit_index]; - exit.point = point_end; - exit.index = index_end; + tokenizer.events[exit_index].point = exit_far.point.clone(); index = exit_far_index; continue; -- cgit