Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Jul 11, 2024
1 parent 6c713d2 commit 52a6f2e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tokenizers/src/pre_tokenizers/metaspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,12 @@ impl PreTokenizer for Metaspace {
}
pretokenized.split(|_, mut normalized| {

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check it builds for Windows 32-bit (3.10)

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check it builds for Windows 32-bit (3.7)

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check everything builds

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check it builds for Windows 32-bit (3.8)

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check it builds for Windows 32-bit (3.9)

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check everything builds & tests (ubuntu-latest)

unused `std::result::Result` that must be used

Check warning on line 131 in tokenizers/src/pre_tokenizers/metaspace.rs

View workflow job for this annotation

GitHub Actions / Check everything builds & tests (macos-latest)

unused `std::result::Result` that must be used
normalized.replace(' ', &self.str_rep)?;
match self.prepend_scheme {
PrependScheme::Always => {
if !normalized.get().starts_with(self.replacement) {
normalized.prepend(&self.str_rep);
}
}
PrependScheme::Never => {}
_ => {} // Handle other cases if needed
};
if self.split {
normalized.split(self.replacement, SplitDelimiterBehavior::MergedWithNext)
} else {
Ok(vec![normalized])
}
});

Ok(())
} else {
pretokenized.split(|_, mut normalized| {
Expand Down

0 comments on commit 52a6f2e

Please sign in to comment.