Skip to content

Commit bf4ca41

Browse files
authored
Fix clippy issues (paritytech#1884)
* fix clippy issues * fix? * fix? * forget about extra_unused_type_parameters lint for now
1 parent 5279fc9 commit bf4ca41

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

bin/millau/runtime/src/rialto_messages.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ mod tests {
162162
RialtoGrandpaInstance,
163163
WithRialtoMessagesInstance,
164164
WithRialtoMessageBridge,
165-
bp_millau::Millau,
166165
>(AssertCompleteBridgeConstants {
167166
this_chain_constants: AssertChainConstants {
168167
block_length: bp_millau::BlockLength::get(),

bin/rialto/runtime/src/millau_messages.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ mod tests {
161161
MillauGrandpaInstance,
162162
WithMillauMessagesInstance,
163163
WithMillauMessageBridge,
164-
bp_rialto::Rialto,
165164
>(AssertCompleteBridgeConstants {
166165
this_chain_constants: AssertChainConstants {
167166
block_length: bp_rialto::BlockLength::get(),

bin/runtime-common/src/integrity.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,9 @@ pub struct AssertChainConstants {
141141
///
142142
/// 1) block weight limits are matching;
143143
/// 2) block size limits are matching.
144-
pub fn assert_chain_constants<R, C>(params: AssertChainConstants)
144+
pub fn assert_chain_constants<R>(params: AssertChainConstants)
145145
where
146146
R: frame_system::Config,
147-
C: Chain,
148147
{
149148
// we don't check runtime version here, because in our case we'll be building relay from one
150149
// repo and runtime will live in another repo, along with outdated relay version. To avoid
@@ -274,17 +273,16 @@ pub struct AssertCompleteBridgeConstants<'a> {
274273

275274
/// All bridge-related constants tests for the complete standard messages bridge (i.e. with bridge
276275
/// GRANDPA and messages pallets deployed).
277-
pub fn assert_complete_bridge_constants<R, GI, MI, B, This>(params: AssertCompleteBridgeConstants)
276+
pub fn assert_complete_bridge_constants<R, GI, MI, B>(params: AssertCompleteBridgeConstants)
278277
where
279278
R: frame_system::Config
280279
+ pallet_bridge_grandpa::Config<GI>
281280
+ pallet_bridge_messages::Config<MI>,
282281
GI: 'static,
283282
MI: 'static,
284283
B: MessageBridge,
285-
This: Chain,
286284
{
287-
assert_chain_constants::<R, This>(params.this_chain_constants);
285+
assert_chain_constants::<R>(params.this_chain_constants);
288286
assert_bridge_grandpa_pallet_constants::<R, GI>();
289287
assert_bridge_messages_pallet_constants::<R, MI>(params.messages_pallet_constants);
290288
assert_bridge_pallet_names::<B, R, GI, MI>(params.pallet_names);

modules/beefy/src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn verify_authority_set<T: Config<I>, I: 'static>(
5252
///
5353
/// We're using 'conservative' approach here, where signatures of `2/3+1` validators are
5454
/// required..
55-
pub(crate) fn signatures_required<T: Config<I>, I: 'static>(validators_len: usize) -> usize {
55+
pub(crate) fn signatures_required(validators_len: usize) -> usize {
5656
validators_len - validators_len.saturating_sub(1) / 3
5757
}
5858

@@ -67,7 +67,7 @@ fn verify_signatures<T: Config<I>, I: 'static>(
6767

6868
// Ensure that the commitment was signed by enough authorities.
6969
let msg = commitment.commitment.encode();
70-
let mut missing_signatures = signatures_required::<T, I>(authority_set.len());
70+
let mut missing_signatures = signatures_required(authority_set.len());
7171
for (idx, (authority, maybe_sig)) in
7272
authority_set.validators().iter().zip(commitment.signatures.iter()).enumerate()
7373
{

0 commit comments

Comments
 (0)