diff --git a/bindings/python/src/tokenizer.rs b/bindings/python/src/tokenizer.rs index 832b993c..f3ab156d 100644 --- a/bindings/python/src/tokenizer.rs +++ b/bindings/python/src/tokenizer.rs @@ -718,7 +718,9 @@ 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