diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-20 12:34:06 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-20 12:34:06 +0200 |
commit | 7894ec75a7070591c3499fce1f409563c4edc7d7 (patch) | |
tree | 170d736268a30b728f28b164213a0a0ac47414da /src/construct/label_end.rs | |
parent | 7ec35068c86a546dac8172e74e8a34e3b6813eb2 (diff) | |
download | markdown-rs-7894ec75a7070591c3499fce1f409563c4edc7d7.tar.gz markdown-rs-7894ec75a7070591c3499fce1f409563c4edc7d7.tar.bz2 markdown-rs-7894ec75a7070591c3499fce1f409563c4edc7d7.zip |
Refactor to use less vecs for events
Diffstat (limited to 'src/construct/label_end.rs')
-rw-r--r-- | src/construct/label_end.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/label_end.rs b/src/construct/label_end.rs index 2124681..6bd634f 100644 --- a/src/construct/label_end.rs +++ b/src/construct/label_end.rs @@ -612,7 +612,7 @@ fn collapsed_reference_open(tokenizer: &mut Tokenizer, code: Code) -> StateFnRes /// This turns correct label start (image, link) and label end into links and /// images, or turns them back into data. #[allow(clippy::too_many_lines)] -pub fn resolve_media(tokenizer: &mut Tokenizer) -> Vec<Event> { +pub fn resolve_media(tokenizer: &mut Tokenizer) { let mut left = tokenizer.label_start_list_loose.split_off(0); let mut left_2 = tokenizer.label_start_stack.split_off(0); let media = tokenizer.media_list.split_off(0); @@ -773,5 +773,5 @@ pub fn resolve_media(tokenizer: &mut Tokenizer) -> Vec<Event> { index += 1; } - edit_map.consume(tokenizer.events.split_off(0)) + edit_map.consume(&mut tokenizer.events); } |