mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix clippy errors on tests (#2160)
## Issue Addressed
There are some clippy error on tests.
## Proposed Changes
Enable clippy check on tests and fix the errors. 💪
This commit is contained in:
@@ -306,7 +306,7 @@ fn invalid_surrounding_from_first_source() {
|
||||
let second = attestation_data_builder(3, 4);
|
||||
StreamTest {
|
||||
cases: vec![
|
||||
Test::single(first.clone()),
|
||||
Test::single(first),
|
||||
Test::single(second.clone()),
|
||||
Test::single(attestation_data_builder(2, 5)).expect_invalid_att(
|
||||
InvalidAttestation::NewSurroundsPrev {
|
||||
@@ -326,8 +326,8 @@ fn invalid_surrounding_multiple_votes() {
|
||||
let third = attestation_data_builder(2, 3);
|
||||
StreamTest {
|
||||
cases: vec![
|
||||
Test::single(first.clone()),
|
||||
Test::single(second.clone()),
|
||||
Test::single(first),
|
||||
Test::single(second),
|
||||
Test::single(third.clone()),
|
||||
Test::single(attestation_data_builder(0, 4)).expect_invalid_att(
|
||||
InvalidAttestation::NewSurroundsPrev {
|
||||
|
||||
@@ -69,7 +69,7 @@ fn valid_same_block_different_validator() {
|
||||
registered_validators: vec![pubkey(0), pubkey(1)],
|
||||
cases: vec![
|
||||
Test::with_pubkey(pubkey(0), block.clone()),
|
||||
Test::with_pubkey(pubkey(1), block.clone()),
|
||||
Test::with_pubkey(pubkey(1), block),
|
||||
],
|
||||
}
|
||||
.run()
|
||||
|
||||
@@ -119,6 +119,7 @@ mod test {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[allow(clippy::eq_op)]
|
||||
fn signing_root_partial_eq() {
|
||||
let h0 = SigningRoot(Hash256::zero());
|
||||
let h1 = SigningRoot(Hash256::repeat_byte(1));
|
||||
|
||||
Reference in New Issue
Block a user