diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 15:23:45 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-11 15:23:45 +0200 |
commit | cf9f0039911597cd5c9bc8e98f61b5df09b02130 (patch) | |
tree | 43fcec13b338fd64b800df1f72c8cec01adc8581 /src/construct/partial_data.rs | |
parent | d87dc75500a2e73d9521135054b42c18e6eae987 (diff) | |
download | markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.gz markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.tar.bz2 markdown-rs-cf9f0039911597cd5c9bc8e98f61b5df09b02130.zip |
Remove boxes around resolvers
Diffstat (limited to 'src/construct/partial_data.rs')
-rw-r--r-- | src/construct/partial_data.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/construct/partial_data.rs b/src/construct/partial_data.rs index fda021e..f9b7947 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -7,6 +7,7 @@ //! [text]: crate::content::text use crate::event::{Kind, Name}; +use crate::resolve::Name as ResolveName; use crate::state::{Name as StateName, State}; use crate::tokenizer::Tokenizer; @@ -44,7 +45,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { State::Next(StateName::DataAtBreak) } Some(byte) if tokenizer.tokenize_state.markers.contains(&byte) => { - tokenizer.register_resolver_before("data".to_string(), Box::new(resolve_data)); + tokenizer.register_resolver_before(ResolveName::Data); State::Ok } _ => { @@ -77,7 +78,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { } /// Merge adjacent data events. -pub fn resolve_data(tokenizer: &mut Tokenizer) { +pub fn resolve(tokenizer: &mut Tokenizer) { let len = tokenizer.events.len(); let mut index = 0; |