Skip to content

Commit

Permalink
Remove redundancy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Sep 24, 2024
1 parent 1a7d5a9 commit c88e9d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ fn encoding_to_tokens(encoding: &tokenizers::Encoding, input: &str) -> Vec<Simpl
let offsets = encoding.get_offsets();
let input_ids = encoding.get_ids();
if offsets.len() == input_ids.len() {
encoding
.get_ids()
input_ids
.iter()
.zip(encoding.get_offsets())
.zip(offsets)
.map(|(&id, &(start, stop))| {
let text = input
.chars()
Expand Down

0 comments on commit c88e9d4

Please sign in to comment.