aboutsummaryrefslogtreecommitdiffstats
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-22 15:24:18 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-06-22 15:24:18 +0200
commit84008b9a22bdf1af744c1b830241be33d14862ea (patch)
treefe3dd66a25c2a7c8ffd4ffa4fdf667d816fe1288 /src/tokenizer.rs
parent227e844154d9a592b80a88d7b8731d3d2f2fb3e2 (diff)
downloadmarkdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.tar.gz
markdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.tar.bz2
markdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.zip
Refactor some unneeded assignments
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index f76a0f8..7b71308 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -1651,12 +1651,10 @@ impl Tokenizer {
/// Used in [`Tokenizer::attempt`][Tokenizer::attempt] and [`Tokenizer::check`][Tokenizer::check].
fn attempt_impl(
state: impl FnOnce(&mut Tokenizer, Code) -> StateFnResult + 'static,
- codes: Vec<Code>,
+ mut codes: Vec<Code>,
done: impl FnOnce((Vec<Code>, Vec<Code>), bool, &mut Tokenizer) -> StateFnResult + 'static,
) -> Box<StateFn> {
Box::new(|tokenizer, code| {
- let mut codes = codes;
-
let (next, remainder) = check_statefn_result(state(tokenizer, code));
match code {