mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 14:51:07 +00:00
Fix new nightly clippy issues (#1604)
* clipy * revert some fixes that newest clippy reports as issues, but older does not
This commit is contained in:
committed by
Bastian Köcher
parent
6c26aae035
commit
9e1847d12a
@@ -423,7 +423,7 @@ parameter_types! {
|
|||||||
///
|
///
|
||||||
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
|
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
|
||||||
/// week.
|
/// week.
|
||||||
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32;
|
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ parameter_types! {
|
|||||||
///
|
///
|
||||||
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
|
/// Assuming the worst case of every header being finalized, we will keep headers at least for a
|
||||||
/// week.
|
/// week.
|
||||||
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS as u32;
|
pub const HeadersToKeep: u32 = 7 * bp_rialto::DAYS;
|
||||||
|
|
||||||
/// Maximal number of authorities at Millau.
|
/// Maximal number of authorities at Millau.
|
||||||
pub const MaxAuthoritiesAtMillau: u32 = bp_millau::MAX_AUTHORITIES_COUNT;
|
pub const MaxAuthoritiesAtMillau: u32 = bp_millau::MAX_AUTHORITIES_COUNT;
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ mod tests {
|
|||||||
.len();
|
.len();
|
||||||
let difference = (expected_size.unwrap() as f64 - actual_size as f64).abs();
|
let difference = (expected_size.unwrap() as f64 - actual_size as f64).abs();
|
||||||
assert!(
|
assert!(
|
||||||
difference / (std::cmp::min(actual_size, expected_size.unwrap() as usize) as f64) < 0.1,
|
difference / (std::cmp::min(actual_size, expected_size.unwrap()) as f64) < 0.1,
|
||||||
"Too large difference between actual ({}) and expected ({:?}) inbound lane data size. Test case: {}+{}",
|
"Too large difference between actual ({}) and expected ({:?}) inbound lane data size. Test case: {}+{}",
|
||||||
actual_size,
|
actual_size,
|
||||||
expected_size,
|
expected_size,
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ pub fn make_justification_for_header<H: HeaderT>(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Note: Adding 1 to account for the target header
|
// Note: Adding 1 to account for the target header
|
||||||
let chain = generate_chain(i as u32, depth + 1, &header);
|
let chain = generate_chain(i, depth + 1, &header);
|
||||||
|
|
||||||
// We don't include our finality target header in the vote ancestries
|
// We don't include our finality target header in the vote ancestries
|
||||||
for child in &chain[1..] {
|
for child in &chain[1..] {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ impl SyncLoopMetrics {
|
|||||||
|
|
||||||
/// Update using-same-fork flag.
|
/// Update using-same-fork flag.
|
||||||
pub fn update_using_same_fork(&self, using_same_fork: bool) {
|
pub fn update_using_same_fork(&self, using_same_fork: bool) {
|
||||||
self.using_different_forks.set(if using_same_fork { 0 } else { 1 })
|
self.using_different_forks.set((!using_same_fork).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ impl<
|
|||||||
(self.hard_selected_begin_nonce + self.index as MessageNonce),
|
(self.hard_selected_begin_nonce + self.index as MessageNonce),
|
||||||
self.selected_prepaid_nonces,
|
self.selected_prepaid_nonces,
|
||||||
self.selected_unpaid_weight,
|
self.selected_unpaid_weight,
|
||||||
self.selected_size as u32,
|
self.selected_size,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user