Update milli/src/search/matches/mod.rs

This commit is contained in:
Many the fish 2022-07-18 17:47:39 +02:00 committed by GitHub
parent a277daa1f2
commit 8ddb4e750b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -254,7 +254,7 @@ impl<'t, A: AsRef<[u8]>> Matcher<'t, '_, A> {
// create the initial state of the crop window: 2 iterators starting from the matches positions,
// a reverse iterator starting from the first match token position and going towards the beginning of the text,
let mut before_tokens = tokens[..first_match_token_position].iter().rev().peekable();
// an iterator starting from the last match token position and going trew the end of the text.
// an iterator starting from the last match token position and going towards the end of the text.
let mut after_tokens = tokens[last_match_token_position..].iter().peekable();
// grows the crop window peeking in both directions