diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-21 15:44:49 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-21 15:44:49 +0200 |
commit | c43ad9bfb9467627df1b40266ac7b0d570a55a62 (patch) | |
tree | 27d7b01048a2e161f055388cecaa6bf84e1c01a4 /src/construct/partial_data.rs | |
parent | 2d0dfe66d423e707b7de60d9bde0cec7933580fe (diff) | |
download | markdown-rs-c43ad9bfb9467627df1b40266ac7b0d570a55a62.tar.gz markdown-rs-c43ad9bfb9467627df1b40266ac7b0d570a55a62.tar.bz2 markdown-rs-c43ad9bfb9467627df1b40266ac7b0d570a55a62.zip |
Refactor to move `index` field to `point`
Diffstat (limited to 'src/construct/partial_data.rs')
-rw-r--r-- | src/construct/partial_data.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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; |