From 8162222295d71ea7fd9270c7b3b9497b91db3f1f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 10 Aug 2022 09:16:36 +0200 Subject: Rename `State::Fn` to `State::Next` --- src/construct/partial_label.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/construct/partial_label.rs') diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs index 070bdc0..718af06 100644 --- a/src/construct/partial_label.rs +++ b/src/construct/partial_label.rs @@ -78,7 +78,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); tokenizer.exit(tokenizer.tokenize_state.token_2.clone()); tokenizer.enter(tokenizer.tokenize_state.token_3.clone()); - State::Fn(StateName::LabelAtBreak) + State::Next(StateName::LabelAtBreak) } _ => State::Nok, } @@ -102,7 +102,7 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { } else { match tokenizer.current { Some(b'\n') => { - let state_name = space_or_tab_eol_with_options( + let name = space_or_tab_eol_with_options( tokenizer, EolOptions { content_type: Some(ContentType::String), @@ -110,9 +110,9 @@ pub fn at_break(tokenizer: &mut Tokenizer) -> State { }, ); tokenizer.attempt( - state_name, - State::Fn(StateName::LabelEolAfter), - State::Fn(StateName::LabelAtBlankLine), + name, + State::Next(StateName::LabelEolAfter), + State::Next(StateName::LabelAtBlankLine), ) } Some(b']') => { @@ -177,7 +177,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State { if !tokenizer.tokenize_state.seen && !matches!(byte, b'\t' | b' ') { tokenizer.tokenize_state.seen = true; } - State::Fn(if matches!(byte, b'\\') { + State::Next(if matches!(byte, b'\\') { StateName::LabelEscape } else { StateName::LabelInside @@ -198,7 +198,7 @@ pub fn escape(tokenizer: &mut Tokenizer) -> State { Some(b'[' | b'\\' | b']') => { tokenizer.consume(); tokenizer.tokenize_state.size += 1; - State::Fn(StateName::LabelInside) + State::Next(StateName::LabelInside) } _ => inside(tokenizer), } -- cgit