aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/definition.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-13 20:38:00 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-10-13 20:38:00 +0200
commitec1cee9d7e01722b1d87552bb5f7b0cab7602af6 (patch)
tree43985129ec1ee613288eb553545f613fd31af095 /src/construct/definition.rs
parented23a4a3630d0f06f86f8482ecb495ccf0892e62 (diff)
downloadmarkdown-rs-ec1cee9d7e01722b1d87552bb5f7b0cab7602af6.tar.gz
markdown-rs-ec1cee9d7e01722b1d87552bb5f7b0cab7602af6.tar.bz2
markdown-rs-ec1cee9d7e01722b1d87552bb5f7b0cab7602af6.zip
Replace some unused code for assertions
Diffstat (limited to 'src/construct/definition.rs')
-rw-r--r--src/construct/definition.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/construct/definition.rs b/src/construct/definition.rs
index 8ccfb90..0ce2ffb 100644
--- a/src/construct/definition.rs
+++ b/src/construct/definition.rs
@@ -215,15 +215,11 @@ pub fn label_nok(tokenizer: &mut Tokenizer) -> State {
/// ^
/// ```
pub fn marker_after(tokenizer: &mut Tokenizer) -> State {
- if matches!(tokenizer.current, Some(b'\t' | b'\n' | b' ')) {
- tokenizer.attempt(
- State::Next(StateName::DefinitionDestinationBefore),
- State::Next(StateName::DefinitionDestinationBefore),
- );
- State::Retry(space_or_tab_eol(tokenizer))
- } else {
- State::Retry(StateName::DefinitionDestinationBefore)
- }
+ tokenizer.attempt(
+ State::Next(StateName::DefinitionDestinationBefore),
+ State::Next(StateName::DefinitionDestinationBefore),
+ );
+ State::Retry(space_or_tab_eol(tokenizer))
}
/// Before destination.