0xazure / supernova

Tool for exporting GitHub stars as an organized list.
Apache License 2.0
3 stars 3 forks source link

Format codebase using Clippy #5

Closed seanprashad closed 5 years ago

seanprashad commented 6 years ago

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 commented 6 years ago

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!