fix style

This commit is contained in:
mpostma 2020-12-08 16:03:05 +01:00 committed by many
parent aeb676e757
commit 2a145e288c
No known key found for this signature in database
GPG Key ID: 2CEF23B75189EACA

View File

@ -83,8 +83,8 @@ where
let analyzed_text = self.analyzer.analyze(text); let analyzed_text = self.analyzer.analyze(text);
let tokens = process_tokens(analyzed_text.tokens()) let tokens = process_tokens(analyzed_text.tokens())
.map(|(i, mut t)| { .map(|(i, mut t)| {
t.byte_start = t.byte_start + current_byte_offset; t.byte_start += current_byte_offset;
t.byte_end = t.byte_end + current_byte_offset; t.byte_end += current_byte_offset;
(i + current_word_offset, t) (i + current_word_offset, t)
}) })
.enumerate(); .enumerate();
@ -163,6 +163,7 @@ fn process_tokens<'a>(tokens: impl Iterator<Item = Token<'a>>) -> impl Iterator<
.filter(|(_, t)| t.is_word()) .filter(|(_, t)| t.is_word())
} }
#[allow(clippy::too_many_arguments)]
fn index_token( fn index_token(
token: Token, token: Token,
word_pos: usize, word_pos: usize,