Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ lint:
cargo clippy --workspace --tests -- \
-D clippy::fn_to_numeric_cast_any \
-D warnings \
-A clippy::derive_partial_eq_without_eq \
-A clippy::from-over-into \
-A clippy::upper-case-acronyms \
-A clippy::vec-init-then-push
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/http_api/src/block_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ impl BlockId {
.map_err(warp_utils::reject::beacon_chain_error)?;
Ok((*root, execution_optimistic))
} else {
return Err(warp_utils::reject::custom_not_found(format!(
Err(warp_utils::reject::custom_not_found(format!(
"beacon block with root {}",
root
)));
)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/store/src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<'a, T: EthSpec, Hot: ItemStore<T>, Cold: ItemStore<T>> RootsIterator<'a, T,
(Err(BeaconStateError::SlotOutOfBounds), Err(BeaconStateError::SlotOutOfBounds)) => {
// Read a `BeaconState` from the store that has access to prior historical roots.
if let Some(beacon_state) =
next_historical_root_backtrack_state(&*self.store, &self.beacon_state)
next_historical_root_backtrack_state(self.store, &self.beacon_state)
.handle_unavailable()?
{
self.beacon_state = Cow::Owned(beacon_state);
Expand Down
10 changes: 4 additions & 6 deletions common/deposit_contract/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ fn read_contract_file_from_url(url: Url) -> Result<Value, String> {
.map_err(|e| format!("Respsonse is not a valid json {:?}", e))?;
Ok(contract)
}
Err(e) => {
return Err(format!(
"No abi file found. Failed to download from github: {:?}",
e
))
}
Err(e) => Err(format!(
"No abi file found. Failed to download from github: {:?}",
e
)),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/sensitive_url/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Serialize for SensitiveUrl {
where
S: Serializer,
{
serializer.serialize_str(&self.full.to_string())
serializer.serialize_str(self.full.as_ref())
}
}

Expand Down
2 changes: 1 addition & 1 deletion consensus/ssz_types/src/fixed_vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ mod test {
let vec = vec![0, 2, 4, 6];
let fixed: FixedVector<u64, U4> = FixedVector::from(vec);

assert_eq!(fixed.get(0), Some(&0));
assert_eq!(fixed.first(), Some(&0));
assert_eq!(fixed.get(3), Some(&6));
assert_eq!(fixed.get(4), None);
}
Expand Down
2 changes: 1 addition & 1 deletion consensus/ssz_types/src/variable_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ mod test {
let vec = vec![0, 2, 4, 6];
let fixed: VariableList<u64, U4> = VariableList::from(vec);

assert_eq!(fixed.get(0), Some(&0));
assert_eq!(fixed.first(), Some(&0));
assert_eq!(fixed.get(3), Some(&6));
assert_eq!(fixed.get(4), None);
}
Expand Down
1 change: 1 addition & 0 deletions testing/state_transition_vectors/src/exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct ExitTest {
validator_index: u64,
exit_epoch: Epoch,
state_epoch: Epoch,
#[allow(clippy::type_complexity)]
state_modifier: Box<dyn FnOnce(&mut BeaconState<E>)>,
#[allow(clippy::type_complexity)]
block_modifier:
Expand Down