Skip to content

Commit 632accf

Browse files
committed
refactor: 🚨 clippy
1 parent 2208ed5 commit 632accf

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ jobs:
2525
- name: TOML fmt
2626
run: taplo fmt --check
2727
- name: Clippy
28-
run: cargo clippy --all
28+
run: |
29+
cargo clippy --all -- -D warnings
30+
cargo clippy --all --all-features -- -D warnings
31+
cargo clippy --all --no-default-features -- -D warnings
2932
build:
3033
runs-on: ubuntu-latest
3134
steps:

fuzzer/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ edition = "2018"
66
description = "Fuzzer for EVM."
77
license = "Apache-2.0"
88

9+
[lints.rust]
10+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
11+
912
[dependencies]
1013
honggfuzz = "0.5"
1114

fuzzer/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use evm_core::Machine;
22
use std::rc::Rc;
33

44
fn find_subsequence(haystack: &[u8], needle: &[u8]) -> Option<usize> {
5-
return haystack
5+
haystack
66
.windows(needle.len())
7-
.position(|window| window == needle);
7+
.position(|window| window == needle)
88
}
99

1010
fn split_at_delim(sequence: &[u8], delim: &[u8]) -> (Vec<u8>, Vec<u8>) {

0 commit comments

Comments
 (0)