Skip to content

Commit

Permalink
fmt and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Mar 25, 2024
1 parent fc9befa commit d3e8008
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tokenizers/src/pre_tokenizers/metaspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,11 @@ impl PreTokenizer for Metaspace {
if !normalized.get().starts_with(self.replacement) {
normalized.prepend(&self.str_rep);
}
} else if self.prepend_scheme == PrependScheme::First {
if normalized.offsets_original().0 == 0
&& !normalized.get().starts_with(self.replacement)
{
normalized.prepend(&self.str_rep);
}
} else if self.prepend_scheme == PrependScheme::First
&& normalized.offsets_original().0 == 0
&& !normalized.get().starts_with(self.replacement)
{
normalized.prepend(&self.str_rep);
}
normalized.split(self.replacement, SplitDelimiterBehavior::MergedWithNext)
})
Expand Down

0 comments on commit d3e8008

Please sign in to comment.