Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nazmulidris opened this issue Nov 8, 2023 · 0 comments
Open

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

nazmulidris opened this issue Nov 8, 2023 · 0 comments
Labels

Comments

@nazmulidris
Copy link
Member

nazmulidris commented Nov 8, 2023

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.

@NadiaIdris NadiaIdris changed the title [all] Use new units for handling index and count units Use new units for handling index and count units Nov 25, 2023
@NadiaIdris NadiaIdris added the all label Nov 25, 2023
@nazmulidris nazmulidris changed the title Use new units for handling index and count units For r3bl_rs_utils_core crate, use new units for handling index and count units Nov 25, 2023
@nazmulidris nazmulidris changed the title For r3bl_rs_utils_core crate, use new units for handling index and count units [core] use new units for handling index and count units Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants