mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
Add expect()
for disabling truncation
This commit is contained in:
@ -721,7 +721,7 @@ impl PyTokenizer {
|
||||
/// Disable truncation
|
||||
#[pyo3(text_signature = "(self)")]
|
||||
fn no_truncation(&mut self) {
|
||||
let _ = self.tokenizer.with_truncation(None);
|
||||
self.tokenizer.with_truncation(None).expect("Failed to set truncation to `None`! This should never happen");
|
||||
}
|
||||
|
||||
/// Get the currently set truncation parameters
|
||||
|
Reference in New Issue
Block a user