diff --git a/bindings/python/src/tokenizer.rs b/bindings/python/src/tokenizer.rs index f66f5d2dd..d13aac2ed 100644 --- a/bindings/python/src/tokenizer.rs +++ b/bindings/python/src/tokenizer.rs @@ -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