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

Bad hint at exercises/functions/functions4.rs #1948

Closed
MatthiasBart opened this issue Apr 12, 2024 · 0 comments
Closed

Bad hint at exercises/functions/functions4.rs #1948

MatthiasBart opened this issue Apr 12, 2024 · 0 comments

Comments

@MatthiasBart
Copy link

rustc --version -> 1.77.2
rustlings --version -> 5.6.1
ls -la --> i guess for this not needed
Your OS name and version -> macOS Sonoma 14.0

The hint of this exercise suggests to make the argument price unsigned:

Also: Did you figure out that, technically, u32 would be the more fitting type
for the prices here, since they can't be negative? If so, kudos!

which leads, to either error prone casting or making also the return type u32 which is also not a good idea for results of a subtraction.

I just wanted you to make you aware of this, if you consider this as 'not so bad' then close this issue and ignore it.

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

No branches or pull requests

1 participant