r3bl-open-core icon indicating copy to clipboard operation
r3bl-open-core copied to clipboard

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

Open nazmulidris opened this issue 1 year ago • 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.

nazmulidris avatar Nov 08 '23 15:11 nazmulidris