From cf9f0039911597cd5c9bc8e98f61b5df09b02130 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 11 Aug 2022 15:23:45 +0200 Subject: Remove boxes around resolvers --- src/construct/partial_data.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/construct/partial_data.rs') 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; -- cgit