aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/attention.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-20 12:34:06 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-20 12:34:06 +0200
commit7894ec75a7070591c3499fce1f409563c4edc7d7 (patch)
tree170d736268a30b728f28b164213a0a0ac47414da /src/construct/attention.rs
parent7ec35068c86a546dac8172e74e8a34e3b6813eb2 (diff)
downloadmarkdown-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/attention.rs')
-rw-r--r--src/construct/attention.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/attention.rs b/src/construct/attention.rs
index 7e99600..2cbc563 100644
--- a/src/construct/attention.rs
+++ b/src/construct/attention.rs
@@ -205,7 +205,7 @@ fn inside(tokenizer: &mut Tokenizer, code: Code, marker: MarkerKind) -> StateFnR
/// Resolve attention sequences.
#[allow(clippy::too_many_lines)]
-fn resolve_attention(tokenizer: &mut Tokenizer) -> Vec<Event> {
+fn resolve_attention(tokenizer: &mut Tokenizer) {
let codes = &tokenizer.parse_state.codes;
let mut edit_map = EditMap::new();
let mut start = 0;
@@ -523,7 +523,7 @@ fn resolve_attention(tokenizer: &mut Tokenizer) -> Vec<Event> {
index += 1;
}
- edit_map.consume(tokenizer.events.split_off(0))
+ edit_map.consume(&mut tokenizer.events);
}
/// Classify whether a character code represents whitespace, punctuation, or