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

Format codebase using Clippy #5

Closed
seanprashad opened this issue Nov 1, 2018 · 1 comment
Closed

Format codebase using Clippy #5

seanprashad opened this issue Nov 1, 2018 · 1 comment
Labels
good first issue 🌟 These issues are good for way to get started with supernova

Comments

@seanprashad
Copy link
Contributor

seanprashad commented Nov 1, 2018

Here are two current linting issues that we can fix up:

Checking supernova v0.1.0 (/Users/sean/projects/supernova)
warning: unneeded return statement
  --> src/lib.rs:99:9
   |
99 |         return Ok(());
   |         ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(())`
   |
   = note: #[warn(clippy::needless_return)] on by default
   = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#needless_return

warning: unneeded return statement
   --> src/lib.rs:137:5
    |
137 | /     return match link_headers {
138 | |         None => None,
139 | |         Some(links) => links
140 | |             .values()
...   |
148 | |             .and_then(|link_value| Some(link_value.link().to_owned())),
149 | |     };
    | |______^
    |
    = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#needless_return
help: remove `return` as shown
    |
137 |     match link_headers {
138 |         None => None,
139 |         Some(links) => links
140 |             .values()
141 |             .iter()
142 |             .find(|&val| {
  ...

    Finished dev [unoptimized + debuginfo] target(s) in 46.40s
@0xazure 0xazure added the good first issue 🌟 These issues are good for way to get started with supernova label Nov 1, 2018
@0xazure
Copy link
Owner

0xazure commented Nov 1, 2018

warning: unneeded return statement

Not surprised in the slightest, I'm too used to C/++ apparently.

This would make a great first issue for someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🌟 These issues are good for way to get started with supernova
Projects
None yet
Development

No branches or pull requests

2 participants