Returns `true` if the list has a length of 0.
(&self)
| 292 | |
| 293 | /// Returns `true` if the list has a length of 0. |
| 294 | pub fn is_empty(&self) -> bool { |
| 295 | // 0 is a magic value for the empty list. Any list in the pool array must have a positive |
| 296 | // length. |
| 297 | self.index == 0 |
| 298 | } |
| 299 | |
| 300 | /// Get the number of elements in the list. |
| 301 | pub fn len(&self, pool: &ListPool<T>) -> usize { |