r3bl-org/r3bl-open-core

[core] use new units for handling index and count units

Opened this issue · 0 comments

Currently we use the same unit ChUnit as as unit of measurement and type for width and index. That causes problems, since:

  1. index = width - 1
  2. 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.