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

word-count: change interface from u32 to usize #1845

Closed
senekor opened this issue Jan 1, 2024 · 0 comments · Fixed by #1874
Closed

word-count: change interface from u32 to usize #1845

senekor opened this issue Jan 1, 2024 · 0 comments · Fixed by #1874

Comments

@senekor
Copy link
Contributor

senekor commented Jan 1, 2024

"counts" in Rust are by default represented as usize.

This might be a breaking change if the tests expect a u32.
(wipe community solutions 👎)

But it may well be possible to fix the tests to merge check_word_count into each test case and let type inference handle the rest.
By not referring to u32 or usize explicitly, a breaking change can be avoided.
This would also move "Remove all util functions from test files" (#1824) forward.

I got the idea while updating my solution, refactoring a bit using hashbag and having to manually convert from usize to the less idiomatic u32.

senekor added a commit that referenced this issue Mar 27, 2024
Due to type inference, this is not a breaking change.

closes #1845

[no important files changed]
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 a pull request may close this issue.

1 participant