Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Add clippy (#67) and cleanup dependencies
Browse files Browse the repository at this point in the history
* Added Clipp
* removed mockstream
* updated rust-protobuf and regenerated the message files with it

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
  • Loading branch information
tac0turtle authored and tomtau committed Jun 3, 2019
1 parent d5205ed commit 2efb9b6
Show file tree
Hide file tree
Showing 9 changed files with 1,154 additions and 895 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
rustup component add rustfmt-preview
rustfmt --version
cargo fmt -- --check --color=auto
- run:
name: Check Linting
command: |
rustup component add clippy
cargo clippy
- run:
name: Nightly Build
command: |
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The code should follow [Rust Style Guide](https://github.com/rust-lang/rfcs/tree
Before opening a Pull Request please run the checks below:

* Install rustfmt: `rustup component add rustfmt`
* Install clippy: `rustup component add clippy`

### Testing

Expand All @@ -56,6 +57,12 @@ Make sure your code is well-formatted by running

```cargo fmt```

### Lint (clippy)

Lint your code (i.e. check it for common issues) with:

```cargo clippy```

## License

Copyright © 2018-2019 Tendermint
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ bytes = "0.4"
protobuf = "2.2.0"
byteorder = "1.2.7"
integer-encoding = "1.0.5"
mockstream = "0.0.3"
log = "0.4.6"
env_logger = "0.6.1"
tokio = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Encoder for ABCICodec {

fn encode(&mut self, msg: Response, buf: &mut BytesMut) -> Result<(), Box<Error>> {
let msg_len = msg.compute_size();
let varint = i64::encode_var_vec(msg_len as i64);
let varint = i64::encode_var_vec(i64::from(msg_len));

let remaining = buf.remaining_mut();
let needed = msg_len as usize + varint.len();
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ extern crate integer_encoding;
#[macro_use]
extern crate log;
extern crate core;
extern crate mockstream;
extern crate protobuf;
extern crate tokio;

Expand Down

0 comments on commit 2efb9b6

Please sign in to comment.