[core] use new units for handling index and count units
Opened this issue · 0 comments
nazmulidris commented
Currently we use the same unit ChUnit
as as unit of measurement and type for width and index. That causes problems, since:
- index = width - 1
- width = index + 1
Instead of saving everything as ChUnit
, it would be best to provide a WidthUnit
and IndexUnit
and then audit the entire codebase and make changes where necessary. From impl traits should be provided so we can go from width unit to index unit and vice versa.