Skip to content

nucleotide-codons: rm unneeded return#1003

Merged
petertseng merged 1 commit intoexercism:masterfrom
petertseng:return
Nov 17, 2020
Merged

nucleotide-codons: rm unneeded return#1003
petertseng merged 1 commit intoexercism:masterfrom
petertseng:return

Conversation

@petertseng
Copy link
Copy Markdown
Member

clippy:
warning: unneeded return statement
note: #[warn(clippy::needless_return)] on by default
help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

Removing the return and semicolon will make the code more rusty.

I understand this exercise is deprecated and that we already did this to
protein-translation in 3d3cd9a.
Clippy doesn't know this when we run it against all the exercises, so
might as well just do this to get closer to zero Clippy warnings in
tests (which we are pretty close to)

clippy:
warning: unneeded `return` statement
note: `#[warn(clippy::needless_return)]` on by default
help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

Removing the `return` and semicolon will make the code more rusty.

I understand this exercise is deprecated and that we already did this to
protein-translation in 3d3cd9a.
Clippy doesn't know this when we run it against all the exercises, so
might as well just do this to get closer to zero Clippy warnings in
tests (which we are pretty close to)
@petertseng petertseng merged commit 8773c29 into exercism:master Nov 17, 2020
@petertseng petertseng deleted the return branch November 17, 2020 16:18
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