Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitris Iliopoulos committed Nov 20, 2024
1 parent 99a4dc1 commit 4ad446c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bindings/python/src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,7 @@ impl PyTokenizer {
add_special_tokens: bool,
) -> PyResult<Vec<PyEncoding>> {
let mut items = Vec::<tk::EncodeInput>::with_capacity(input.len());
for i in 0..input.len() {
let item = &input[i];
for item in &input {
let item: tk::EncodeInput = if is_pretokenized {
item.extract::<PreTokenizedEncodeInput>()?.into()
} else {
Expand Down Expand Up @@ -1097,8 +1096,7 @@ impl PyTokenizer {
add_special_tokens: bool,
) -> PyResult<Vec<PyEncoding>> {
let mut items = Vec::<tk::EncodeInput>::with_capacity(input.len());
for i in 0..input.len() {
let item = &input[i];
for item in &input {
let item: tk::EncodeInput = if is_pretokenized {
item.extract::<PreTokenizedEncodeInput>()?.into()
} else {
Expand Down

0 comments on commit 4ad446c

Please sign in to comment.