diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:11:59 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-10-14 10:11:59 +0200 |
commit | efd20b4999d51fed3ff641f922da05e8bb2481a0 (patch) | |
tree | b6ed7ba04d1f020e119364821badff056b17a058 /src/construct/attention.rs | |
parent | 95f66dc8b4a8cb4c40aa6e4b231bafde516a68bc (diff) | |
download | markdown-rs-efd20b4999d51fed3ff641f922da05e8bb2481a0.tar.gz markdown-rs-efd20b4999d51fed3ff641f922da05e8bb2481a0.tar.bz2 markdown-rs-efd20b4999d51fed3ff641f922da05e8bb2481a0.zip |
Remove some unused code around slices
Diffstat (limited to 'src/construct/attention.rs')
-rw-r--r-- | src/construct/attention.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/construct/attention.rs b/src/construct/attention.rs index 7ac41de..dd87e05 100644 --- a/src/construct/attention.rs +++ b/src/construct/attention.rs @@ -81,12 +81,9 @@ use crate::resolve::Name as ResolveName; use crate::state::{Name as StateName, State}; use crate::subtokenize::Subresult; use crate::tokenizer::Tokenizer; -use crate::util::{ - char::{ - after_index as char_after_index, before_index as char_before_index, classify_opt, - Kind as CharacterKind, - }, - slice::Slice, +use crate::util::char::{ + after_index as char_after_index, before_index as char_before_index, classify_opt, + Kind as CharacterKind, }; use alloc::{vec, vec::Vec}; @@ -242,9 +239,7 @@ fn get_sequences(tokenizer: &mut Tokenizer) -> Vec<Sequence> { let end = index + 1; let exit = &tokenizer.events[end]; - let marker = Slice::from_point(tokenizer.parse_state.bytes, &enter.point) - .head() - .unwrap(); + let marker = tokenizer.parse_state.bytes[enter.point.index]; let before = classify_opt(char_before_index( tokenizer.parse_state.bytes, enter.point.index, |