From 0f20660cb95abd4f407bdafa2c45e01829fa971f Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 19 Jul 2022 17:56:57 +0200 Subject: Refactor to remove cloning in `edit_map` --- src/subtokenize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/subtokenize.rs') diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 174ddfe..df7b015 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -61,7 +61,7 @@ pub fn link_to(events: &mut [Event], pevious: usize, next: usize) { /// Parse linked events. /// /// Supposed to be called repeatedly, returns `1: true` when done. -pub fn subtokenize(mut events: Vec, parse_state: &ParseState) -> (Vec, bool) { +pub fn subtokenize(events: Vec, parse_state: &ParseState) -> (Vec, bool) { let mut edit_map = EditMap::new(); let mut done = true; let mut index = 0; @@ -178,5 +178,5 @@ pub fn subtokenize(mut events: Vec, parse_state: &ParseState) -> (Vec