diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 12:52:16 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-15 12:52:16 +0200 |
commit | cfa06e07cdf72018595ae447febc5736e73814e9 (patch) | |
tree | 459a4418c40302619ee1f270f9655a1cff1d0607 /src/construct/code_fenced.rs | |
parent | 81025bd1af39a62fe25de8e77b31bd1e907808b7 (diff) | |
download | markdown-rs-cfa06e07cdf72018595ae447febc5736e73814e9.tar.gz markdown-rs-cfa06e07cdf72018595ae447febc5736e73814e9.tar.bz2 markdown-rs-cfa06e07cdf72018595ae447febc5736e73814e9.zip |
Remove unneeded field
Diffstat (limited to '')
-rw-r--r-- | src/construct/code_fenced.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/construct/code_fenced.rs b/src/construct/code_fenced.rs index cf3336b..a8a4009 100644 --- a/src/construct/code_fenced.rs +++ b/src/construct/code_fenced.rs @@ -178,8 +178,6 @@ struct Info { prefix: usize, /// Kind of fences. kind: Kind, - /// To do. - concrete: bool, } /// Start of fenced code. @@ -223,7 +221,6 @@ fn before_sequence_open(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult Info { prefix, size: 0, - concrete: tokenizer.concrete, kind: Kind::from_code(code), }, ) @@ -381,7 +378,7 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult if ok { Box::new(move |t, c| at_non_lazy_break(t, c, info)) } else { - Box::new(move |t, c| after(t, c, info)) + Box::new(after) } })(tokenizer, code) } @@ -394,7 +391,7 @@ fn at_non_lazy_break(tokenizer: &mut Tokenizer, code: Code, info: Info) -> State |t, c| close_begin(t, c, info), |ok| { if ok { - Box::new(|t, c| after(t, c, clone)) + Box::new(after) } else { Box::new(|t, c| content_before(t, c, clone)) } @@ -578,12 +575,11 @@ fn content_continue(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateF /// console.log('1') /// ~~~| /// ``` -#[allow(clippy::needless_pass_by_value)] -fn after(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnResult { +fn after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { tokenizer.exit(Token::CodeFenced); // Feel free to interrupt. tokenizer.interrupt = false; - // Restore previous `concrete`. - tokenizer.concrete = info.concrete; + // No longer concrete. + tokenizer.concrete = false; (State::Ok, Some(vec![code])) } |