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

fix: improve function argument type in functions3.rs #687

Merged
merged 1 commit into from
Apr 4, 2021

Conversation

flakolefluk
Copy link
Contributor

Hi!
Going through the exercise functions3.rs, it feels like using u32 instead of i32 could be an improvement. Even though passing a negative number won't make the compiler complaint and the loop will exit immediately, it feels that it lacks of intention (to the eyes of someone who's learning like me). I hope this small change makes sense.

@flakolefluk flakolefluk changed the title fix: improve function argument type fix: improve function argument type infunctions3.rs Mar 31, 2021
@flakolefluk flakolefluk changed the title fix: improve function argument type infunctions3.rs fix: improve function argument type in functions3.rs Mar 31, 2021
@shadows-withal shadows-withal merged commit a6509cc into rust-lang:main Apr 4, 2021
@shadows-withal
Copy link
Member

Thanks!

@all-contributors add @flakolefluk for content

@allcontributors
Copy link
Contributor

@fmoko

I've put up a pull request to add @flakolefluk! 🎉

barder60 pushed a commit to barder60/rustlings that referenced this pull request Apr 13, 2021
tcatonet pushed a commit to tcatonet/rustlings that referenced this pull request Apr 13, 2021
LAymeric pushed a commit to LAymeric/rustlings that referenced this pull request Apr 13, 2021
wh5a pushed a commit to wh5a/rustlings-solutions that referenced this pull request Apr 17, 2021
* upstream/main:
  Rename lichi to lychee in the fruit example
  docs: update .all-contributorsrc [skip ci]
  docs: update README.md [skip ci]
  fix: use trait objects for from_str
  fix: use trait objects for try_from_into
  docs: update .all-contributorsrc [skip ci]
  docs: update README.md [skip ci]
  fix(functions3): improve function argument type (rust-lang#687)
  doc: Update collections exercises instruction to match the standard naming
  fix(collections): Naming exercises for vectors and hashmap
ingrachen pushed a commit to ingrachen/rustlings that referenced this pull request May 2, 2021
lsagna pushed a commit to lsagna/rustlings that referenced this pull request May 10, 2021
liangminhua pushed a commit to liangminhua/rustlings that referenced this pull request Jul 10, 2021
noiffion pushed a commit to noiffion/rustlings that referenced this pull request Aug 20, 2021
bugaolengdeyuxiaoer pushed a commit to bugaolengdeyuxiaoer/rustlings that referenced this pull request Dec 28, 2021
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
Spacebody pushed a commit to Spacebody/my-rustlings that referenced this pull request Nov 18, 2022
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