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/heading_atx.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/heading_atx.rs')
-rw-r--r-- | src/construct/heading_atx.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/heading_atx.rs b/src/construct/heading_atx.rs index 4546924..feb1e9d 100644 --- a/src/construct/heading_atx.rs +++ b/src/construct/heading_atx.rs @@ -193,7 +193,7 @@ fn data(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { } /// Resolve heading (atx). -pub fn resolve(tokenizer: &mut Tokenizer) -> Vec<Event> { +pub fn resolve(tokenizer: &mut Tokenizer) { let mut edit_map = EditMap::new(); let mut index = 0; let mut heading_start: Option<usize> = None; @@ -258,5 +258,5 @@ pub fn resolve(tokenizer: &mut Tokenizer) -> Vec<Event> { index += 1; } - edit_map.consume(tokenizer.events.split_off(0)) + edit_map.consume(&mut tokenizer.events); } |