diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-22 15:24:18 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-22 15:24:18 +0200 |
commit | 84008b9a22bdf1af744c1b830241be33d14862ea (patch) | |
tree | fe3dd66a25c2a7c8ffd4ffa4fdf667d816fe1288 /src/subtokenize.rs | |
parent | 227e844154d9a592b80a88d7b8731d3d2f2fb3e2 (diff) | |
download | markdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.tar.gz markdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.tar.bz2 markdown-rs-84008b9a22bdf1af744c1b830241be33d14862ea.zip |
Refactor some unneeded assignments
Diffstat (limited to '')
-rw-r--r-- | src/subtokenize.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 1702387..4ee2242 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -57,8 +57,7 @@ pub fn link(events: &mut [Event], index: usize) { /// Parse linked events. /// /// Supposed to be called repeatedly, returns `1: true` when done. -pub fn subtokenize(events: Vec<Event>, codes: &[Code]) -> (Vec<Event>, bool) { - let mut events = events; +pub fn subtokenize(mut events: Vec<Event>, codes: &[Code]) -> (Vec<Event>, bool) { let mut index = 0; // Map of first chunks to their tokenizer. let mut head_to_tokenizer: HashMap<usize, Tokenizer> = HashMap::new(); |