Optimism L1 -> L2 derivation #176
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
16 errors
[clippy] lib/src/optimism/deposits.rs#L89:
lib/src/optimism/deposits.rs#L89
error: unreachable statement
--> lib/src/optimism/deposits.rs:89:5
|
87 | return true; // TODO: remove me!
| ----------- any code following this expression is unreachable
88 |
89 | let input = BloomInput::Raw(address.as_slice());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
|
= note: `-D unreachable-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unreachable_code)]`
|
[clippy] lib/src/optimism/system_config.rs#L142:
lib/src/optimism/system_config.rs#L142
error: unreachable statement
--> lib/src/optimism/system_config.rs:142:5
|
140 | return true; // TODO: remove me!
| ----------- any code following this expression is unreachable
141 |
142 | let input = BloomInput::Raw(address.as_slice());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
|
[clippy] lib/src/optimism/deposits.rs#L86:
lib/src/optimism/deposits.rs#L86
error: unused variable: `address`
--> lib/src/optimism/deposits.rs:86:20
|
86 | pub fn can_contain(address: &Address, bloom: &Bloom) -> bool {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
|
[clippy] lib/src/optimism/deposits.rs#L86:
lib/src/optimism/deposits.rs#L86
error: unused variable: `bloom`
--> lib/src/optimism/deposits.rs:86:39
|
86 | pub fn can_contain(address: &Address, bloom: &Bloom) -> bool {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_bloom`
|
[clippy] lib/src/optimism/system_config.rs#L139:
lib/src/optimism/system_config.rs#L139
error: unused variable: `address`
--> lib/src/optimism/system_config.rs:139:20
|
139 | pub fn can_contain(address: &Address, bloom: &Bloom) -> bool {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_address`
|
[clippy] lib/src/optimism/system_config.rs#L139:
lib/src/optimism/system_config.rs#L139
error: unused variable: `bloom`
--> lib/src/optimism/system_config.rs:139:39
|
139 | pub fn can_contain(address: &Address, bloom: &Bloom) -> bool {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_bloom`
|
[clippy] lib/src/optimism/mod.rs#L87:
lib/src/optimism/mod.rs#L87
error: you should consider adding a `Default` implementation for `MemDb`
--> lib/src/optimism/mod.rs:87:5
|
87 | / pub fn new() -> Self {
88 | | MemDb {
89 | | full_op_block: HashMap::new(),
90 | | op_block_header: HashMap::new(),
... |
93 | | }
94 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `-D clippy::new-without-default` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::new_without_default)]`
help: try adding this
|
86 + impl Default for MemDb {
87 + fn default() -> Self {
88 + Self::new()
89 + }
90 + }
|
|
[clippy] lib/src/optimism/mod.rs#L154:
lib/src/optimism/mod.rs#L154
error: used `assert_eq!` with a literal bool
--> lib/src/optimism/mod.rs:154:13
|
154 | assert_eq!(can_contain_deposits, false);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
= note: `-D clippy::bool-assert-comparison` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::bool_assert_comparison)]`
help: replace it with `assert!(..)`
|
154 - assert_eq!(can_contain_deposits, false);
154 + assert!(!can_contain_deposits);
|
|
[clippy] lib/src/optimism/mod.rs#L155:
lib/src/optimism/mod.rs#L155
error: used `assert_eq!` with a literal bool
--> lib/src/optimism/mod.rs:155:13
|
155 | assert_eq!(can_contain_config, false);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
help: replace it with `assert!(..)`
|
155 - assert_eq!(can_contain_config, false);
155 + assert!(!can_contain_config);
|
|
[clippy] lib/src/optimism/mod.rs#L203:
lib/src/optimism/mod.rs#L203
error: using `clone` on type `FixedBytes<32>` which implements the `Copy` trait
--> lib/src/optimism/mod.rs:203:47
|
203 | let mut derive_output = DeriveOutput::new(op_head_hash.clone());
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `op_head_hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
|
[clippy] lib/src/optimism/mod.rs#L281:
lib/src/optimism/mod.rs#L281
error: using `clone` on type `FixedBytes<32>` which implements the `Copy` trait
--> lib/src/optimism/mod.rs:281:36
|
281 | prev_eth_block_hash = Some(eth_block_hash.clone());
| ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `eth_block_hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
[clippy] lib/src/optimism/mod.rs#L316:
lib/src/optimism/mod.rs#L316
error: this loop could be written as a `for` loop
--> lib/src/optimism/mod.rs:316:9
|
316 | while let Some(op_batch) = op_batches.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for op_batch in op_batches.by_ref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]`
|
[clippy] lib/src/optimism/mod.rs#L398:
lib/src/optimism/mod.rs#L398
error: casting integer literal to `u8` is unnecessary
--> lib/src/optimism/mod.rs:398:72
|
398 | ... let all_zero: FixedBytes<12> = FixedBytes([0 as u8; 12]);
| ^^^^^^^ help: try: `0_u8`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-D clippy::unnecessary-cast` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`
|
[clippy] lib/src/optimism/mod.rs#L403:
lib/src/optimism/mod.rs#L403
error: useless conversion to the same type: `u64`
--> lib/src/optimism/mod.rs:403:41
|
403 | ... number: eth_block_header.number.into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `eth_block_header.number`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-D clippy::useless-conversion` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`
|
[clippy] lib/src/optimism/mod.rs#L483:
lib/src/optimism/mod.rs#L483
error: using `clone` on type `FixedBytes<32>` which implements the `Copy` trait
--> lib/src/optimism/mod.rs:483:36
|
483 | derive_output.push(op_state.safe_head.hash.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `op_state.safe_head.hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
clippy
reviewdog exited with status code: 1
|