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

Move some generally useful functions from PER to utility module #190

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

Nicceboy
Copy link
Contributor

I think these functions (log2, to_vec etc.) might be better located on utils.rs or something similar, since they are not codec specific. For example, OER needs them as well.

@XAMPPRocky
Copy link
Collaborator

Thank you for your PR! The only thing I would change is that I wouldn't have a single utils module. I don't like those because it's too generic, anything could be put there.

I would instead make two modules num and bits. I would move log2 to num, the rest to bits and rename range_from_bits to range_from_len.

@Nicceboy
Copy link
Contributor Author

I made the change. Should these have own directory as well or current is good?

@XAMPPRocky XAMPPRocky merged commit e6ad634 into librasn:main Oct 30, 2023
65 checks passed
@XAMPPRocky
Copy link
Collaborator

I don't think we need them to have a directory unless they have sub modules.

@github-actions github-actions bot mentioned this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants