mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Rust - Add len() and is_empty() on Encoding
This commit is contained in:
@ -32,7 +32,7 @@ impl PyObjectProtocol for Encoding {
|
||||
#[pyproto]
|
||||
impl PySequenceProtocol for Encoding {
|
||||
fn __len__(self) -> PyResult<usize> {
|
||||
Ok(self.encoding.get_ids().len())
|
||||
Ok(self.encoding.len())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user