aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/label_start_link.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/construct/label_start_link.rs')
-rw-r--r--src/construct/label_start_link.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/construct/label_start_link.rs b/src/construct/label_start_link.rs
index 404b91a..9462ba7 100644
--- a/src/construct/label_start_link.rs
+++ b/src/construct/label_start_link.rs
@@ -29,7 +29,7 @@
use super::label_end::resolve_media;
use crate::token::Token;
-use crate::tokenizer::{Code, LabelStart, State, StateFnResult, Tokenizer};
+use crate::tokenizer::{Code, LabelStart, State, Tokenizer};
/// Start of label (link) start.
///
@@ -37,7 +37,7 @@ use crate::tokenizer::{Code, LabelStart, State, StateFnResult, Tokenizer};
/// > | a [b] c
/// ^
/// ```
-pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
+pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State {
match code {
Code::Char('[') if tokenizer.parse_state.constructs.label_start_link => {
let start = tokenizer.events.len();
@@ -52,8 +52,8 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
inactive: false,
});
tokenizer.register_resolver_before("media".to_string(), Box::new(resolve_media));
- (State::Ok, 0)
+ State::Ok(0)
}
- _ => (State::Nok, 0),
+ _ => State::Nok,
}
}