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(exercises): Does not follow the function naming convention snake_case #854

Merged
merged 3 commits into from
Oct 18, 2021
Merged

Conversation

xuesongbj
Copy link
Contributor

This exercise does not follow the snake_case specification, cargo test has the following warning:

warning: function is_FooBar should have a snake case name.

To ensure the meaning is correct, try to add allow non_snake_case.

@xuesongbj xuesongbj changed the title Does not follow the function naming convention snake_case fix(exercises/traits)Does not follow the function naming convention snake_case Sep 29, 2021
@xuesongbj xuesongbj changed the title fix(exercises/traits)Does not follow the function naming convention snake_case fix(exercises/traits)Does not follow the function naming convention snake_case Sep 29, 2021
@xuesongbj xuesongbj changed the title fix(exercises/traits)Does not follow the function naming convention snake_case fix(exercises)Does not follow the function naming convention snake_case Sep 29, 2021
@xuesongbj xuesongbj changed the title fix(exercises)Does not follow the function naming convention snake_case fix(exercises): does not follow the function naming convention snake_case Sep 29, 2021
@xuesongbj xuesongbj changed the title fix(exercises): does not follow the function naming convention snake_case fix(exercises): Does not follow the function naming convention snake_case Sep 29, 2021
@shadows-withal
Copy link
Member

In this case it'd be okay to change the offending function names too, since it's against convention and may confuse people that encounter it.

@xuesongbj
Copy link
Contributor Author

is_FooBar rename is_foo_bar ? @diannasoriel

@xuesongbj
Copy link
Contributor Author

If the problem is not fixed, there is a warning message

@shadows-withal
Copy link
Member

is_FooBar rename is_foo_bar ?

Yes, that sounds right.

@solariens
Copy link

Yes, I also encountered this warning problem. when will this commit merge into master branch? @diannasoriel

@shadows-withal
Copy link
Member

Again, I would rather fix the problem properly than rely on suppressing the warning. Therefore, changing the non-snake-case function names to snake-case names would be the correct solution here.

@xuesongbj
Copy link
Contributor Author

xuesongbj commented Sep 29, 2021

Has been modified according to snake-case:

1bcbb4e

@shadows-withal shadows-withal merged commit 1663a16 into rust-lang:main Oct 18, 2021
@shadows-withal
Copy link
Member

@all-contributors please add @xuesongbj for content

@allcontributors
Copy link
Contributor

@diannasoriel

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

catull pushed a commit to catull/rustlings that referenced this pull request Oct 21, 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
ComixHe pushed a commit to ComixHe/rustlings that referenced this pull request Jun 20, 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.

None yet

3 participants