From af05141ad1a3850e273f2992fe3ceb85747f4d62 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Jul 2022 13:31:00 +0200 Subject: Refactor to organize resolvers --- src/construct/partial_data.rs | 4 ++-- 1 file changed, 2 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 b4dfda0..3bc8c1c 100644 --- a/src/construct/partial_data.rs +++ b/src/construct/partial_data.rs @@ -42,7 +42,7 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code, stop: Vec) -> StateFnRe (State::Fn(Box::new(|t, c| at_break(t, c, stop))), None) } _ if stop.contains(&code) => { - tokenizer.register_resolver("data".to_string(), Box::new(resolve)); + tokenizer.register_resolver("data".to_string(), Box::new(resolve_data)); (State::Ok, Some(vec![code])) } _ => { @@ -75,7 +75,7 @@ fn data(tokenizer: &mut Tokenizer, code: Code, stop: Vec) -> StateFnResult } /// Merge adjacent data events. -pub fn resolve(tokenizer: &mut Tokenizer) -> Vec { +pub fn resolve_data(tokenizer: &mut Tokenizer) -> Vec { let mut edit_map = EditMap::new(); let len = tokenizer.events.len(); let mut index = 0; -- cgit