Skip to content

Commit

Permalink
Add expect() for disabling truncation
Browse files Browse the repository at this point in the history
  • Loading branch information
boyleconnor committed Aug 6, 2023
1 parent efea6c7 commit a0a8ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/python/src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0a8ebe

Please sign in to comment.