aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_non_lazy_continuation.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/construct/partial_non_lazy_continuation.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/construct/partial_non_lazy_continuation.rs b/src/construct/partial_non_lazy_continuation.rs
index 37e9ce3..c3b82c7 100644
--- a/src/construct/partial_non_lazy_continuation.rs
+++ b/src/construct/partial_non_lazy_continuation.rs
@@ -26,9 +26,9 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
tokenizer.enter(Token::LineEnding);
tokenizer.consume(code);
tokenizer.exit(Token::LineEnding);
- (State::Fn(Box::new(after)), None)
+ (State::Fn(Box::new(after)), 0)
}
- _ => (State::Nok, None),
+ _ => (State::Nok, 0),
}
}
@@ -41,8 +41,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
/// ```
fn after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
if tokenizer.lazy {
- (State::Nok, None)
+ (State::Nok, 0)
} else {
- (State::Ok, Some(vec![code]))
+ (State::Ok, if matches!(code, Code::None) { 0 } else { 1 })
}
}