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 clippy warnings #1149

Merged
merged 3 commits into from Nov 4, 2018

Conversation

2 participants
@hayd
Copy link
Contributor

hayd commented Nov 4, 2018

Run with:
$ DENO_BUILD_PATH=`pwd`/out/debug cargo clippy

There's still one remaining suppressed (due to rust-lang/rust-clippy#1684)

https://github.com/rust-lang-nursery/rust-clippy

hayd added some commits Nov 4, 2018

Fix clippy warnings
Run with:
$ DENO_BUILD_PATH=`pwd`/out/debug cargo clippy

There's still one remaining:
```
warning: Try not to call a closure in the expression where it is declared.
    --> src/ops.rs:1128:36
     |
1128 |     Box::new(futures::future::result((move || {
     |  ____________________________________^
1129 | |     // TODO properly parse addr
1130 | |     let addr = SocketAddr::from_str(address).unwrap();
1131 | |
...    |
1148 | |     ))
1149 | |   })()))
     | |______^
     |
     = note: #[warn(clippy::redundant_closure_call)] on by default
     = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#redundant_closure_call
help: Try doing something like:
     |
1128 |   Box::new(futures::future::result({
1129 |     // TODO properly parse addr
1130 |     let addr = SocketAddr::from_str(address).unwrap();
1131 |
1132 |     let listener = TcpListener::bind(&addr)?;
1133 |     let resource = resources::add_tcp_listener(listener);
```

https://github.com/rust-lang-nursery/rust-clippy
@ry

ry approved these changes Nov 4, 2018

Copy link
Collaborator

ry left a comment

LGTM - nice fixes! It would be great to have this run as part of tools/lint.py

@ry ry merged commit 1241b8e into denoland:master Nov 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@hayd hayd deleted the hayd:clippy branch Nov 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment